This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Wanted: FreeRTOS example illustrating hardware interrupt and RTOS timer

Part Number: AM2434
Other Parts Discussed in Thread: SYSCONFIG

Since interrupt nesting on R5F is not supported when using FreeRTOS I'm looking for a way to have some code executed every millisecond being interruptable by a hardware interrupt (ADC interrupt in my case).

I have tried  to put my millisecond code into timer_callback_1ms() and create a timer:

int main()
{
    /* init SOC specific modules */
    System_init();
    Board_init();


    handle1ms = xTimerCreateStatic("1ms-Timer", 2, pdTRUE, 0, timer_callback_1ms, &ms1_tmdef);
    configASSERT(handle1ms != NULL);
    xTimerStart(handle1ms, 0);

before creating the main task and starting the scheduler.

It ends up in _DebugP_assert(). Stepping out of it it comes to taskSELECT_HIGHEST_PRIORITY_TASK(); in line 3063 of tasks.c

At that time timer_callback_1ms() has been called twice.

Any hint on what I could be doing wrong is appreciated.

Also working examples that demonstrate how to use FreeRTOS timers and tasks together with interrupts would be welcome.

So far I have not been able to get anything beyond FreeRTOS main task and interrupts working.

Best regards,

Johannes