esp-idf/components/freertos
Ivan Grokhotkov 5d32e80ea7 freertos: ensure interrupts are disabled before enabling tick timer
xPortStartScheduler calls vPortSetupTimer -> _frxt_tick_timer_init,
which enables tick timer interrupt and sets up the first timeout.
From that point on, the interrupt can fire. If the interrupt happens
while _frxt_dispatch is running, the scheduler will enter an infinite
loop. This is because _frxt_dispatch isn't supposed to be preemptable,
and the tick interrupt will overwrite some of the registers used by
_frxt_dispatch.
Note that this situation doesn't practically occur on the real
hardware, where the execution of vPortSetupTimer and _frxt_dispatch
happens quickly enough. However it can be reproduced on an emulator
if the tick period is set to 1ms.

Add an explicit call to portDISABLE_INTERRUPTS in xPortStartScheduler
to guarantee that _frxt_dispatch doesn't run with interrupts enabled.
This is similar to the esprv_intc_int_set_threshold(1); call in
RISC-V version of port.c.
2021-12-20 17:25:56 +01:00
..
esp_additions bugfix (freertos): Changed minimal stack size to regard watchpoint usage 2021-12-07 10:42:05 +08:00
FreeRTOS-Kernel freertos: ensure interrupts are disabled before enabling tick timer 2021-12-20 17:25:56 +01:00
test CI: Enable ESP8684 build stage CI on master 2021-12-13 19:18:47 +08:00
CMakeLists.txt freertos,esp_system: make dependencies on some components optional 2021-12-13 18:39:49 +01:00
FreeRTOS-openocd.c freertos: fix defining uxTopUsedPriority for esp32s2beta 2019-10-29 16:38:48 +01:00
Kconfig freertos: add kconfig options for task snapshot functions 2021-09-01 15:13:48 +08:00
linker.lf ESP8684: add freertos, hal, esp_system support 2021-11-06 17:33:44 +08:00
sdkconfig.rename freertos: always enable static allocation 2020-12-29 16:18:04 +01:00