Hello All,
Please pardon me if this query sounds silly.
I have configured my project to use FreeRTOS with MPU and created a restricted task which has got a simple xTaskDelayUntil function in it. This works fine without any issues.
But as soon as I call a dummy function it gives memory exception.
My dummy function is simply incrementing a counter.
static void dummyFunction()
{
static uint32_t callCounter = 0U;
++callCounter;
}
And my task function looks like this:
static void main_1000ms_task( void *pvParameters)
{
TickType_t xFrequency;
xFrequency = 1000;
(void)pvParameters;
TickType_t xLastWakeTime = xTaskGetTickCount();
while(true)
{
dummyFunction();
(void)xTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
Looking at the assemble code for dummyFunction, it seems that the memory exception occurs when CPU is trying to access Stack memory of dummyFunction.
Can you please tell me if my understanding is correct and how to get round this issue.
Regards