OVMS3-idf/components/esp32
Ivan Grokhotkov e324707cc8 esp_restart: fix possible race while stalling other CPU, enable WDT early
Previously esp_restart would stall the other CPU before enabling RTC_WDT.
If the other CPU was executing an s32c1i instruction, the lock signal
from CPU to the arbiter would still be held after CPU was stalled. If
the CPU running esp_restart would then try to access the same locked
memory pool, it would be stuck, because lock signal would never be
released.

With this change, esp_restart resets the other CPU before stalling it.
Ideally, we would want to reset the CPU and keep it in reset, but the
hardware doesn't have such feature for PRO_CPU (it is possible to hold
APP_CPU in reset using DPORT register). Given that ROM code will not use
s32c1i in the first few hundred cycles, doing reset and then stall seems
to be safe.

In addition to than, RTC_WDT initialization is moved to the beginning of
the function, to prevent possible lock-up if CPU stalling still has any
issue.
2017-11-09 16:05:35 +08:00
..
hwcrypto component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
include esp_restart: fix possible race while stalling other CPU, enable WDT early 2017-11-09 16:05:35 +08:00
ld component/bt: update bluetooth library to increase programming delay in EA 2017-09-30 18:40:49 +08:00
lib@76f8649ac6 Fix a problem which initialize current can reach 800mA. 2017-11-02 11:02:38 +08:00
test esp32: reset APP CPU when doing esp_restart 2017-06-15 18:15:35 +08:00
app_trace.c component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
cache_err_int.c component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
clk.c esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
component.mk component/esp32 : fix dualcore bug 2017-05-08 21:53:43 +08:00
core_dump.c esp32: Core dump sanity checks were added 2017-04-26 21:13:02 +03:00
cpu_start.c component/bt : fix interrupt number conflict 2017-06-15 19:41:54 +08:00
crosscore_int.c component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
deep_sleep.c component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
dport_access.c esp_restart: fix possible race while stalling other CPU, enable WDT early 2017-11-09 16:05:35 +08:00
event_default_handlers.c wifi event_default_handlers/tcpip_adapter: Support disabling WiFi, keeping Ethernet 2017-02-24 14:46:23 +11:00
event_loop.c esp_event_send: check if the event loop is initialized 2017-06-05 11:01:26 +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 MR things 2017-03-09 19:59:09 +08:00
hw_random.c esp_random: XOR the RNG register value several times before returning it 2017-01-04 17:07:12 +11:00
int_wdt.c driver: timer 2016-11-23 17:23:21 +08:00
intr_alloc.c component/bt : fix interrupt number conflict 2017-06-15 19:41:54 +08:00
ipc.c ipc task: Allow configuration of IPC task stack size 2017-07-04 15:30:04 +08:00
Kconfig esp32: by default, set 40MHz crystal frequency 2017-08-23 16:39:22 +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 Bugfix - Panic Handler not halting when running on both cores 2017-06-21 16:58:48 +08:00
phy.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
phy_init.c Merge branch 'bugfix/init_nvs_in_bluetooth' into 'master' 2017-07-20 14:26:14 +08:00
phy_init_data.h component/esp32 : remove phy init data description 2017-10-17 11:28:35 +08:00
restore.c esp_system: remove link time dependency on WiFi stack 2017-06-15 18:15:36 +08:00
spiram.h Initial public version 2016-08-17 23:08:22 +08:00
system_api.c esp_restart: fix possible race while stalling other CPU, enable WDT early 2017-11-09 16:05:35 +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