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.

multitasking FreeRTOS application lose interrupt

Other Parts Discussed in Thread: CC3200

Hi,

I'm trying to solve an issue with my multithreading FreeRTOS application.

My issue is that sometimes interrupts are not detected and doesn't start handler.

On my firmware run 5 tasks. I detect interrupt on a Zero Cross input that I use to dimming an output.

I think it's a priority problem. I've started from mqtt_client example to write my cc3200 firmware.

How I can set priorities for avoid this issue?

Thanks in advance.

  • Hi aeromechs,

    We will look into this and get back to you,

    Regards,

    Aashish

  • Hi aeromechs,


    You can use MAP_IntPrioritySet driverlib API to set interrupt priority. Also if you are using osi API to register interrupt then pass required interrupt priority to osi_InterruptRegister() API.


    Regards,
    Aashish
  • Hi Aashish,
    thanks for reply. Is the highest priority the INT_PRIORITY_LVL_0?
    But with an interrupt on a pin, that I use for zero cross, that interrupt the MCU every 20 milliseconds, may be too high and avoid to other tasks take MCU control?

    I'm thinking that if I change Interrupt priority, it will not change anything because the scheduler release time slice to interrupt handler, afther that, give mcu control to another task, when time slice is expired. How I can solve this issue?

  • Hi aeromechs,

    aeromechs aeromechs said:
    Is the highest priority the INT_PRIORITY_LVL_0?

    Yes. it's highest interrupt priority.

    aeromechs aeromechs said:
    may be too high and avoid to other tasks take MCU control?

    Depend upon number of task running at a time and how tasks are synchronized.

    aeromechs aeromechs said:
    I'm thinking that if I change Interrupt priority, it will not change anything because the scheduler release time slice to interrupt handler, afther that, give mcu control to another task, when time slice is expired. How I can solve this issue?

    Make sure none of the task hogging the CPU. Use osi_sleep for delay rather than using utilsDelay in task for sleep/delay.  Use synchronization method like semaphore to avoid CPU hogging.

    Regards,

    Aashish