esp-idf/components/esp32
Ivan Grokhotkov 4f909b8ecc 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
2017-01-07 18:45:14 +08:00
..
hwcrypto mbedTLS SHA: Fix cloning of SHA-384 digests 2016-11-25 19:26:30 +11:00
include Add SPI Master driver, example, test and docs 2017-01-06 14:20:32 +08:00
ld Merge branch 'bugfix/ets_delay_on_app_cpu' into 'master' 2017-01-07 18:45:14 +08:00
lib@21e433b827 wifi: add wifi rx buffer number config in menuconfig 2017-01-06 10:12:27 +08:00
test esp32: ets_update_cpu_frequency should set tick scale for both CPUs 2017-01-06 15:00:17 +08:00
abi.cpp Initial public version 2016-08-17 23:08:22 +08:00
brownout.c Add licenses, docbook, general cleanup 2016-10-25 18:18:11 +08:00
component.mk build system: Project ELF should depend on linker scripts, binary libraries 2016-12-12 15:58:53 +11:00
cpu_freq.c esp32: ets_update_cpu_frequency should set tick scale for both CPUs 2017-01-06 15:00:17 +08:00
cpu_start.c deep sleep: add API to control power down 2016-12-16 14:30:27 +08:00
cpu_util.c panic handlers: Print the PC address where abort() was called, don't dump registers 2016-12-28 10:09:40 +11:00
crosscore_int.c Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts 2016-12-08 12:39:33 +08:00
deep_sleep.c deep sleep: set pin configuration right before entering deep sleep 2016-12-16 14:30:27 +08:00
event_default_handlers.c ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
event_loop.c components/esp32: fix renaming of esp_event_set_cb, minor clean up 2016-09-26 12:35:09 +08:00
freertos_hooks.c Add comments/headers according to merge request comments 2016-11-15 12:10:02 +08:00
gdbstub.c Fix small bug in gdbstub where it sometimes would not return a valid stop reason, timing out gdb. Also clean up the code a bit. 2016-12-02 17:42:11 +08:00
heap_alloc_caps.c esp32: modify ld file to fix a crash issue 2017-01-07 16:12:07 +08:00
hw_random.c esp32: add some implementation comments 2016-11-23 12:55:49 +08:00
int_wdt.c driver: timer 2016-11-23 17:23:21 +08:00
intr_alloc.c Add IRAM_ATTR to esp_intr_{enable,disable} 2016-12-19 18:49:28 +08:00
ipc.c components/esp32: add inter-processor call API and implement spi_flash through it 2016-09-12 18:54:45 +08:00
Kconfig wifi: add wifi rx buffer number config in menuconfig 2017-01-06 10:12:27 +08:00
lib_printf.c uart_tx_wait_idle: fix issue with last character not transmitted 2016-12-08 01:42:37 +08:00
libhal.a Initial public version 2016-08-17 23:08:22 +08:00
Makefile.projbuild phy init data: Read PHY init data partition offset from menuconfig 2016-11-18 20:11:16 +08:00
panic.c panic handlers: Print the PC address where abort() was called, don't dump registers 2016-12-28 10:09:40 +11:00
phy_init_data.h phy init data update 2016-12-19 14:23:39 +08:00
phy_init.c implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
phy.h phy_init: reduce the amount of hardwired logic, add coexist init 2016-11-18 20:11:17 +08:00
rtc.h esp32: add some implementation comments 2016-11-23 12:55:49 +08:00
spiram.h Initial public version 2016-08-17 23:08:22 +08:00
system_api.c uart_tx_wait_idle: fix issue with last character not transmitted 2016-12-08 01:42:37 +08:00
task_wdt.c Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts 2016-12-08 12:39:33 +08:00