cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS crashing

leet1
Associate II
Posted on November 10, 2015 at 17:44

Free RTOS is crashing when it is trying to increment Tick. (function xTaskIncrementTick)

I get a data bus error hard faultcaused by the 'if' statement shown below. obviously if I turn Preemption off, it then works. application is built using cubeMx and is using VCP, and FATfs. anyone have go any idea of what is going wrong? a simple application with only freeRTOS works fine.

/* Tasks of equal priority to the currently running task will share
processing time (time slice) if preemption is on, and the application
writer has not explicitly turned time slicing off. */
#if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) )
{
if
( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( unsigned portBASE_TYPE ) 1 )
{
xSwitchRequired = pdTRUE;
}
}
#endif /* ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) */

#freertos #- #stm32f4 #stm32
0 REPLIES 0