how to support interrupt nested in cpu without NVIC

zhuchunxia wrote on Tuesday, June 21, 2016:

in my port source file. my interrupt porting code like this
define portDISABLE_INTERRUPTS() vPortDisableInterrupt()
define portENABLE_INTERRUPTS() vPortEnableInterrupt()

GetLocalPSR() will return current interrupt enable flag and disable interrupt
SetLocalPSR(x) will store interrupt enable flag by x.

it seems to not support interrupt nested as portSET_INTERRUPT_MASK_FROM_ISR() disable all interrupt.

should I set mask to those interrupts which is lower than current interrrupt priority to allow higher priority interrupt happen ?


rtel wrote on Tuesday, June 21, 2016:

If you are implementing a full interrupt nesting scheme then both taskENTER_CRITICAL() and taskENTER_CRITICAL_FROM_ISR() [also called portSET_INTERRUPT_MASK_FROM_ISR()] should disable interrupts up to a user defined maximum interrupt priority. The interrupts that have a priority above that maximum will never be disabled by the RTOS, but cannot use the FreeRTOS API.

If you are in a critical section then you don’t want interrupts below the user defined maximum to be able to execute - this is not related to interrupt nesting as such as interrupts at or below the above mentioned user defined maximum priority can only nest when you are outside of a critical section (which is the point of entering the critical section).

zhuchunxia wrote on Wednesday, June 22, 2016:

the user defined maximum interrupt priority you mentioned is configMAX_SYSCALL_INTERRUPT_PRIORITY ?
I know the value is used to set interrupt priority register instead of RTOS kernel .
my cpu has no interrupt priority register to rearrange all interrupt prority.