From: richardbarry Date: Sun, 13 Nov 2011 21:13:26 +0000 (+0000) Subject: Added: /* This is called from the context switch, so will be called from a X-Git-Tag: V7.1.0~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=91b5e7c8083bdb5bba8dcdde234f14e40ab9e173;p=freertos Added: /* This is called from the context switch, so will be called from a critical section. xTaskGetTickCountFromISR() contains its own critical section, and the ISR safe critical sections are not designed to nest, so reset the critical section. */ portSET_INTERRUPT_MASK_FROM_ISR(); in main.c. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1630 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c b/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c index c71065e3c..19cfa685b 100644 --- a/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c +++ b/Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c @@ -624,6 +624,12 @@ const unsigned long ulSysTickPendingBit = 0x04000000UL; /* How many times has it overflowed? */ ulTickCount = xTaskGetTickCountFromISR(); + + /* This is called from the context switch, so will be called from a + critical section. xTaskGetTickCountFromISR() contains its own critical + section, and the ISR safe critical sections are not designed to nest, + so reset the critical section. */ + portSET_INTERRUPT_MASK_FROM_ISR(); /* Is there a SysTick interrupt pending? */ if( ( *pulInterruptCTRLState & ulSysTickPendingBit ) != 0UL )