OVMS3-idf/components
Ivan Grokhotkov 6d4ed4ff6c soc/rtc: wait for SLOW_CLK cycle when switching CPU clock
Previous implementation waited for 20us after setting
RTC_CNTL_SOC_CLK_SEL_XTL register, using ets_delay_us, assuming that
the CPU was running at XTAL frequency. In reality, clock switch happened
on the next RTC_SLOW_CLK cycle, and CPU could be running at the previous
frequency (for example, 240 MHz) until then.
ets_delay_us would wait for 20 us * 40 cycles per us = 800 CPU cycles
(assuming 40 MHz XTAL; even less with a 26 MHz XTAL).
But if CPU was running at 240 MHz, 800 cycles would pass in just 3.3us,
while SLOW_CLK cycle could happen as much as 1/150kHz = 6.7us after
RTC_CNTL_SOC_CLK_SEL_XTL was set. So the software would not actually wait
long enough for the clock switch to happen, and would disable the PLL
while CPU was still clocked from PLL, leading to a halt.

This implementation uses rtc_clk_wait_for_slow_cycle() function to wait
until the clock switch, removing the need to wait for a fixed number of
CPU cycles.
2017-10-26 19:53:53 +08:00
..
app_trace sysview: always use TG as timestamp source 2017-10-18 14:19:20 +08:00
app_update ota_ops: Fix get_selected_boot_partition() in case there is no factory partition 2017-09-04 17:37:28 +10:00
aws_iot mbedtls: Rename net to net_sockets (in line with 2.4.0 API change) 2017-09-07 18:02:39 +10:00
bootloader soc/rtc: warn if detected XTAL frequency does not match configured one 2017-09-11 11:42:26 +08:00
bootloader_support build system: Restore ifdef/ifndef in Makefiles, clean up examples build 2017-09-05 16:11:03 +10:00
bt component/bt: Fix scan problem of bonded device using public address 2017-10-25 11:52:03 +08:00
coap coap: Initialise/update the libcoap submodule 2017-01-10 11:12:02 +11:00
console console: handle empty input to esp_console_run correctly 2017-10-13 07:14:53 +08:00
cxx cxx: Add KConfig option for C++ exceptions, disable by default 2017-10-17 15:29:25 +08:00
driver Merge branch 'bugfix/i2c_hw_fsm_recover' into 'master' 2017-10-23 10:16:02 +08:00
esp32 Merge branch 'bugfix/optmize_ipv6_event' into 'master' 2017-10-23 17:00:10 +08:00
esp_adc_cal feature(I2S-ADC): add ADC mode for I2S. 2017-09-14 13:24:08 +08:00
espcoredump bugfix: fixed path to esptool when there is no compiled python module for it 2017-03-21 13:30:38 +03:00
esptool_py Add --warn-undefined-variables to MAKEFLAGS 2017-09-05 16:10:46 +10:00
ethernet ethernet: lock APB frequency while ethernet is enabled 2017-10-18 14:37:22 +08:00
expat Build system: Raise warning level 2016-11-16 15:57:34 +11:00
fatfs unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
freertos Merge branch 'feature/dfs' into 'master' 2017-10-22 12:34:11 +08:00
heap Merge branch 'feature/unit-test-configs' into 'master' 2017-10-20 14:03:53 +08:00
idf_test test: udpate new BLE known issues: 2017-09-22 09:49:18 +08:00
jsmn Add jsmn JSON parser component 2017-03-07 10:18:47 +11:00
json cJSON:Add float format process 2017-01-09 17:51:48 +08:00
libsodium unit tests: fix warnings, build with -Werror 2017-10-19 21:35:23 +08:00
log Add logic to make external RAM usable with malloc() 2017-09-28 17:17:50 +08:00
lwip Merge branch 'bugfix/tcpip_stack_overflow_logging_printf' into 'master' 2017-10-26 15:09:22 +08:00
mbedtls mbedtls: Rename net to net_sockets (in line with 2.4.0 API change) 2017-09-07 18:02:39 +10:00
mdns Merge branch 'bugfix/memory_issues_pr838' into 'master' 2017-08-31 10:45:19 +08:00
micro-ecc micro-ecc: Add submodule dependency 2016-11-17 09:18:51 +11:00
newlib Merge branch 'bugfix/select_fdset' into 'master' 2017-10-23 10:55:33 +08:00
nghttp nghttp: Restore nghttp2 v1.24 2017-08-22 13:01:36 +10:00
nvs_flash nvs: fix nvs_flash_init_partition initializing default partition 2017-10-13 07:19:16 +08:00
openssl mbedtls: Rename net to net_sockets (in line with 2.4.0 API change) 2017-09-07 18:02:39 +10:00
partition_table build system: fix warning about undefined variable 'quote' 2017-10-19 21:35:23 +08:00
pthread pthreads local storage: add test for unique keys 2017-10-17 15:29:25 +08:00
sdmmc sdmmc: allow command timeouts to be configured 2017-10-13 08:16:07 +08:00
soc soc/rtc: wait for SLOW_CLK cycle when switching CPU clock 2017-10-26 19:53:53 +08:00
spi_flash spi_flash: fix build error with profiling enabled 2017-10-22 12:57:56 +08:00
spiffs unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
tcpip_adapter bugfix: add netif info in event message when got ipv6 address 2017-10-23 13:50:43 +08:00
ulp sleep: add light sleep, factor out APIs common for deep/light sleep 2017-09-01 10:36:14 +08:00
vfs add missing ioctl declaration 2017-10-23 19:47:33 +08:00
wear_levelling unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
wpa_supplicant Add the fast crypto function in supplicant 2017-08-09 21:36:13 +08:00
xtensa-debug-module esp32: Apptrace API enhancement 2017-07-24 19:57:44 +03:00