mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-29 22:45:48 +08:00
Merge branch 'bugfix/panic_switch_back_to_user_mode' into 'master'
CPU switch from kernel to user mode See merge request sdk/ESP8266_RTOS_SDK!306
This commit is contained in:
@ -1521,9 +1521,15 @@ _xt_ext_panic:
|
||||
*
|
||||
* Todo: Close NMI
|
||||
*/
|
||||
rsil a0, XCHAL_EXCM_LEVEL
|
||||
rsil a0, PS_INTLEVEL(5)
|
||||
wsr a0, EXCSAVE_2
|
||||
|
||||
/*
|
||||
* CPU must switch from kernel mode to user mode
|
||||
*/
|
||||
movi a0, PS_INTLEVEL(5) | PS_UM
|
||||
wsr a0, PS
|
||||
|
||||
/* Allocate exception frame and save minimal context. */
|
||||
mov a0, sp
|
||||
movi sp, _chip_interrupt_tmp
|
||||
|
Reference in New Issue
Block a user