OVMS3-idf/components
Ivan Grokhotkov 07543dfec4 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-11-09 15:51:14 +08:00
..
app_update Enable checks for encrypted flash in OTA 2017-04-11 19:10:26 +08:00
aws_iot AWS IoT Device SDK Support 2017-03-13 17:23:29 +08:00
bootloader bugfix(80m flash): cherry pick from idf3.0, add gpio config and vddsdio config 2017-11-08 12:50:08 +08:00
bootloader_support component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
bt component/bt : fix merge missing of scan fail bugfix 2017-11-08 18:22:05 +08:00
coap coap: Initialise/update the libcoap submodule 2017-01-10 11:12:02 +11:00
cxx cxx: don’t pull libstdc++ local support in unit tests 2017-06-15 18:15:36 +08:00
driver fix(spi_master): fix the bug that VSPI no respond when host changed 2017-09-26 00:04:04 +08:00
esp32 bugfix(80m flash): cherry pick from idf3.0, add gpio config and vddsdio config 2017-11-08 12:50: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 esptool: Update to v2.0 final release 2017-06-14 15:41:51 +10:00
ethernet docs: Generate Doxygen directives for API documentation 2017-05-19 18:26:02 +02:00
expat Build system: Raise warning level 2016-11-16 15:57:34 +11:00
fatfs fatfs: fix duplicate unit test name 2017-06-23 14:59:21 +08:00
freertos Fix an assert that erroneously triggered when popping a zero-byte payload from the end of the ringbuffer 2017-09-26 00:02:52 +08:00
idf_test test: add NVS compatible test case and CI job 2017-06-04 10:29:15 +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 libsodium: don’t link tests when TEST_ALL=1 is used 2017-06-15 18:15:37 +08:00
log Merge branch 'bugfix/spi_flash_large_writes' into 'master' 2017-06-16 15:04:01 +08:00
lwip Broadcast IP route based on source IP address. 2017-09-05 17:51:15 +08:00
mbedtls mbedtls: Fix memory leak in initial ECDH exchange if OOM/failure occurs 2017-07-13 15:55:57 +08:00
mdns Add AFL fuzz test 2017-04-05 09:23:09 +03:00
micro-ecc micro-ecc: Add submodule dependency 2016-11-17 09:18:51 +11:00
newlib newlib locks: Fix _lock_init() & _lock_init_recursive() failing to initialise a lock 2017-07-04 15:23:10 +08:00
nghttp nghttp2: Add submodule to COMPONENT_SUBMODULES, update to release v1.24 2017-09-25 23:54:43 +08:00
nvs_flash nvs: check CRC of items on full pages 2017-09-25 23:49:27 +08:00
openssl components/openssl : Fix compilation error when openssl debugging is enabled 2017-02-20 09:45:50 +08:00
partition_table gen_esp32part: Run unit tests on host as part of gitlab-ci 2017-05-12 16:28:41 +10:00
sdmmc sdmmc tests: Don't run under CI in v2.1 2017-10-16 17:19:00 +08:00
soc soc/rtc: wait for SLOW_CLK cycle when switching CPU clock 2017-11-09 15:51:14 +08:00
spi_flash spi_flash: Fix SPI flash write alignment/size bugs 2017-06-09 17:33:27 +10:00
tcpip_adapter Merge branch 'feature/some_refactor_for_tcpip_adapter' into 'master' 2017-07-13 22:16:58 +08:00
ulp examples: add ULP ADC example 2017-05-16 13:15:02 +08:00
vfs Merge branch 'bugfix/vfs_fixes' into 'master' 2017-06-23 11:33:27 +08:00
wear_levelling Getting started guides 2017-04-27 19:51:42 +02:00
wpa_supplicant wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +08:00
xtensa-debug-module component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00