Skip to content

Commit

Permalink
Fix usleep on ESP8266, add unit test
Browse files Browse the repository at this point in the history
Caused by espressif/ESP8266_NONOS_SDK#31

PUBLISHED_FROM=8966102143dd21704cb12155256c603a02497ad8
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Jul 26, 2017
1 parent 78a15c4 commit 7c1266c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions common/platforms/esp8266/rom/ESP8266_ROM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4712,8 +4712,11 @@ Disassembly of section .text:
40002ebf: 0108 l32i.n a0, a1, 0
40002ec1: 10c112 addi a1, a1, 16
40002ec4: f00d ret.n
40002ec6: 040000 extui a0, a0, 0, 1
40002ec9: 3fffc7 bbsi a15, 28, 40002f0c <ets_get_cpu_frequency>
...

40002ec8 <_p_cpu_freq>:
40002ec8: ffc704 excw
40002ecb: 3f .byte 0x3f

40002ecc <ets_delay_us>:
40002ecc: f0c112 addi a1, a1, -16
Expand All @@ -4722,7 +4725,7 @@ Disassembly of section .text:
40002ed4: 0109 s32i.n a0, a1, 0
40002ed6: 02cd mov.n a12, a2
40002ed8: 0ae5c5 call0 4000dd38 <xthal_get_ccount>
40002edb: fffb01 l32r a0, 40002ec8 <ets_timer_init+0x60>
40002edb: fffb01 l32r a0, 40002ec8 <_p_cpu_freq>
40002ede: 0008 l32i.n a0, a0, 0
40002ee0: 02dd mov.n a13, a2
40002ee2: 82c0c0 mull a12, a0, a12
Expand All @@ -4740,13 +4743,13 @@ Disassembly of section .text:
...

40002f04 <ets_update_cpu_frequency>:
40002f04: fff131 l32r a3, 40002ec8 <ets_timer_init+0x60>
40002f04: fff131 l32r a3, 40002ec8 <_p_cpu_freq>
40002f07: 0329 s32i.n a2, a3, 0
40002f09: f00d ret.n
...

40002f0c <ets_get_cpu_frequency>:
40002f0c: ffef21 l32r a2, 40002ec8 <ets_timer_init+0x60>
40002f0c: ffef21 l32r a2, 40002ec8 <_p_cpu_freq>
40002f0f: 0228 l32i.n a2, a2, 0
40002f11: f00d ret.n
...
Expand Down
1 change: 1 addition & 0 deletions common/platforms/esp8266/rom/rom.S
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ PROVIDE(_c_0xffdfffff, 0x400025dc)
PROVIDE(_l_rr_not_dsleep, 0x40002624)
PROVIDE(_c_100000, 0x40002664)
PROVIDE(_c_0x3feffe00, 0x40002e5c)
PROVIDE(_p_cpu_freq, 0x40002ec8)
PROVIDE(_x_wdt_interval, 0x40002f14) // arg: 3 -> 11, 6 -> 12, 12 -> 13
PROVIDE(_p_wdt_cfg, 0x40002f30)
PROVIDE(_wdt_soft_timer_fn2, 0x40002f3c)
Expand Down
Binary file modified common/platforms/esp8266/rom/rom.elf
Binary file not shown.

0 comments on commit 7c1266c

Please sign in to comment.