]> granicus.if.org Git - esp-idf/commit
Merge branch 'bugfix/ets_delay_on_app_cpu' into 'master'
authorIvan Grokhotkov <ivan@espressif.com>
Sat, 7 Jan 2017 10:45:14 +0000 (18:45 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Sat, 7 Jan 2017 10:45:14 +0000 (18:45 +0800)
commit4f909b8eccc01341cc82812fab4371cacc696406
tree1387a0a685f40a889d83035cc677e5b2e38d3ba5
parent3708e15ea93493d2922f0b0f55a590fd4696420c
parent1cbc2fa046f4c1afd96054eb2987859c265ec361
Merge branch 'bugfix/ets_delay_on_app_cpu' into 'master'

esp32: ets_update_cpu_frequency should set tick scale for both CPUs

ets_update_cpu_frequency ROM function updates g_ticks_per_us, which is has two copies, one for each CPU.
The APP CPU copy of g_ticks_per_us never got updated, resulting in shorter delays produced by ets_delay_us on the APP CPU.

This MR replaces ROM ets_update_cpu_frequency with a copy in IRAM which updates scaling factors on both of the CPUs.

So now we get expected delays (in microseconds):
```
ets_delay_us core=0 expected=50000 actual=50014
ets_delay_us core=1 expected=50000 actual=50015
vTaskDelay core=0 expected=50000 actual=49428
vTaskDelay core=1 expected=50000 actual=50000
```

Reported on the forum: http://esp32.com/viewtopic.php?f=2&t=713#p3722

See merge request !373
components/esp32/ld/esp32.rom.ld