diff --git a/list.c b/list.c index 5d1dc9e79..9069a2252 100644 --- a/list.c +++ b/list.c @@ -158,6 +158,7 @@ void vListInsert( List_t * const pxList, * 4) Using a queue or semaphore before it has been initialised or * before the scheduler has been started (are interrupts firing * before vTaskStartScheduler() has been called?). + * 5) Misconfigured SysTick priority? Must be lowest (logical) priority. **********************************************************************/ for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */ diff --git a/portable/CCS/ARM_CM3/port.c b/portable/CCS/ARM_CM3/port.c index afd2ff07d..c61297bcc 100644 --- a/portable/CCS/ARM_CM3/port.c +++ b/portable/CCS/ARM_CM3/port.c @@ -331,6 +331,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/CCS/ARM_CM4F/port.c b/portable/CCS/ARM_CM4F/port.c index 19ff798c8..fd537f256 100644 --- a/portable/CCS/ARM_CM4F/port.c +++ b/portable/CCS/ARM_CM4F/port.c @@ -356,6 +356,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/GCC/ARM_CM3/port.c b/portable/GCC/ARM_CM3/port.c index 2546ffaf9..b2684e994 100644 --- a/portable/GCC/ARM_CM3/port.c +++ b/portable/GCC/ARM_CM3/port.c @@ -431,6 +431,9 @@ void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/GCC/ARM_CM4F/port.c b/portable/GCC/ARM_CM4F/port.c index f05a48f42..2d90c2d67 100644 --- a/portable/GCC/ARM_CM4F/port.c +++ b/portable/GCC/ARM_CM4F/port.c @@ -493,6 +493,9 @@ void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/GCC/ARM_CM7/r0p1/port.c b/portable/GCC/ARM_CM7/r0p1/port.c index f9e240e58..e79ac1809 100644 --- a/portable/GCC/ARM_CM7/r0p1/port.c +++ b/portable/GCC/ARM_CM7/r0p1/port.c @@ -483,6 +483,9 @@ void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/IAR/ARM_CM3/port.c b/portable/IAR/ARM_CM3/port.c index e2d3662de..30082e176 100644 --- a/portable/IAR/ARM_CM3/port.c +++ b/portable/IAR/ARM_CM3/port.c @@ -334,6 +334,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/IAR/ARM_CM4F/port.c b/portable/IAR/ARM_CM4F/port.c index e180aede0..a024086b6 100644 --- a/portable/IAR/ARM_CM4F/port.c +++ b/portable/IAR/ARM_CM4F/port.c @@ -371,6 +371,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/IAR/ARM_CM4F_MPU/port.c b/portable/IAR/ARM_CM4F_MPU/port.c index 6fd318fc3..58905ceda 100644 --- a/portable/IAR/ARM_CM4F_MPU/port.c +++ b/portable/IAR/ARM_CM4F_MPU/port.c @@ -483,6 +483,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/IAR/ARM_CM7/r0p1/port.c b/portable/IAR/ARM_CM7/r0p1/port.c index 71caa71e1..48375134a 100644 --- a/portable/IAR/ARM_CM7/r0p1/port.c +++ b/portable/IAR/ARM_CM7/r0p1/port.c @@ -359,6 +359,9 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/MikroC/ARM_CM4F/port.c b/portable/MikroC/ARM_CM4F/port.c index 33fc346a6..cfd350f3b 100644 --- a/portable/MikroC/ARM_CM4F/port.c +++ b/portable/MikroC/ARM_CM4F/port.c @@ -485,6 +485,9 @@ void xPortPendSVHandler( void ) iv IVT_INT_PendSV ics ICS_OFF void xPortSysTickHandler( void ) iv IVT_INT_SysTick ics ICS_AUTO { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/RVDS/ARM_CM3/port.c b/portable/RVDS/ARM_CM3/port.c index 6de6a2568..22a504ae2 100644 --- a/portable/RVDS/ARM_CM3/port.c +++ b/portable/RVDS/ARM_CM3/port.c @@ -424,6 +424,9 @@ __asm void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/RVDS/ARM_CM4F/port.c b/portable/RVDS/ARM_CM4F/port.c index 5f4ac1754..1eba09b17 100644 --- a/portable/RVDS/ARM_CM4F/port.c +++ b/portable/RVDS/ARM_CM4F/port.c @@ -516,6 +516,9 @@ __asm void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already diff --git a/portable/RVDS/ARM_CM7/r0p1/port.c b/portable/RVDS/ARM_CM7/r0p1/port.c index 17e16f3e3..a7305c659 100644 --- a/portable/RVDS/ARM_CM7/r0p1/port.c +++ b/portable/RVDS/ARM_CM7/r0p1/port.c @@ -503,6 +503,9 @@ __asm void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { + /* The SysTick is not allowed to interrupt a critical section. */ + configAssert( uxCriticalNesting == 0 ) + /* The SysTick runs at the lowest interrupt priority, so when this interrupt * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already