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.

F29H85X-SOM-EVM: freertos porting on F29

Part Number: F29H85X-SOM-EVM


Tool/software:

I'm porting my code, which was developed in bare-metal on a F28374D, to F29H85x using FreeRTOS. I encountered some issues regarding execution of tasks synchronized by interrupt-driven notifications.
I have 3 tasks, one synchronized by timer1 that sends a notification to unblock the "main" task every 1ms, another notified by the pwm interrupt every 20ms, and a third notified by the uart RX interrupt. I've encountered two anomalous behaviors:
    1. After a few minutes of code execution, the task synchronized by timer1, which should start the "main" task every 1ms, freezes, remains inactive for about 60 seconds, and then restarts, or
    2. the task continues to run, but instead of being executed every 1ms, it's executed every 10/12ms... it almost seems like the CPU is "overloaded".
      interrupt and task priority are:
      • timer1_INT priority 40
      • uart0_INT priority 250
      • EPWM0_ET_INT priority 30
      • timer2_INT priority 255 (used by FreeRTOS)
      • FreeRTOS ZCD_TASK priority 5 (static, stack size 512)
      • FreeRTOS MAIN_TASK priority 5 (static, stack size 1024)
      • FreeRTOS UART_DBG_TASK priority 4 (static, stack size 512)

If, instead of executing notifications from ISRs, I execute the "main" task from RTOS using vTaskDelay and, still from the main task, notify the 20ms task when it needs to be executed; in this case, everything works correctly.

Any idea or suggestion?

thanks

  • Hi Emanuele,

    From your description, there shouldn't be any issues with the way you have implemented the basic structure. What exactly do you mean when you say the main task freezes, then restarts? A couple things to verify-

    1) Ensure that all the tasks are appropriately blocked after running through their loops

    2) Check for rtos stack overflow. This can be done with the help of FreeRTOS provided functionality

    3) Check for interrupt overflow

    Regards,
    Arnav

  • Hi,

    this is what I see using notify from isr; the GEL file output is:

    interrupt overflow

    This doesn't happen when I notify task from freertos context only.

    any suggestion?

    thanks

    Emanuele

  • Hi,
    When you are notifying tasks from FreeRTOS context only, do you still have the TIMER1 and EPWM interrupts ongoing? And are they overflowing in this case?

    Looks like the other interrupts overflowing is causing the tick interrupt to not go through. The OVF and UVF are FPU overflow and underflow related interrupts. Can you check the Error Aggregator status, this should give you more information about what is occurring


    Regards,
    Arnav