From 91b5e7c8083bdb5bba8dcdde234f14e40ab9e173 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 13 Nov 2011 21:13:26 +0000 Subject: [PATCH] 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 --- Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 ) -- 2.39.5