mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-27 20:27:43 +08:00
feat(freertos): Initialize cpu_sr when FreeRTOS core call port function xPortStartScheduler
This commit is contained in:
@ -176,6 +176,16 @@ void xPortSysTickHandle(void)
|
|||||||
portBASE_TYPE ICACHE_FLASH_ATTR
|
portBASE_TYPE ICACHE_FLASH_ATTR
|
||||||
xPortStartScheduler(void)
|
xPortStartScheduler(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* TAG 1.2.3 FreeRTOS call "portDISABLE_INTERRUPTS" at file tasks.c line 1973, this is not at old one.
|
||||||
|
* This makes it to be a wrong value.
|
||||||
|
*
|
||||||
|
* So we should initialize global value "cpu_sr" with a right value.
|
||||||
|
*
|
||||||
|
* Todo: Remove this one when refactor startup function.
|
||||||
|
*/
|
||||||
|
cpu_sr = 0x20;
|
||||||
|
|
||||||
/*******software isr*********/
|
/*******software isr*********/
|
||||||
_xt_isr_attach(ETS_SOFT_INUM, SoftIsrHdl, NULL);
|
_xt_isr_attach(ETS_SOFT_INUM, SoftIsrHdl, NULL);
|
||||||
_xt_isr_unmask(1 << ETS_SOFT_INUM);
|
_xt_isr_unmask(1 << ETS_SOFT_INUM);
|
||||||
|
Reference in New Issue
Block a user