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.

TM4C129DNCPDT: SYS/BIOS HWI priority settings issue

Part Number: TM4C129DNCPDT
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I have configured 2 HWI's in TM4C129DNCPDT microcontroller. GPIO Port B HWI and UART5 HWI. 

I am facing issue when two interrupts occur at same time. GPIO Port B interrupt is pre-empting UART5 interrupt. Because of this issue, data loss is happening at UART5. So how to overcome this issue?

I have tried setting priority for both HWI's but if i set priority then program is getting halted in middle.

Please give me a solution to fix this issue.

Thank you in advance.

  • Hello Balaji,

    1) Which peripheral was given priority?

    2) Can you share the code for configuring the priorities?

    3) Have you tried to track which task is causing the kernel to get halted?

    Best Regards,

    Ralph Jacobi

  • Thank you Ralph Jacobi for your response,

    1. I have given 0 priority to UART5 HWI and -1(default) to GPIO B.

    2. I have used SYS/BIOS cfg window for configuring HWI's.  I didn't wrote code for that.

    3. I didn't trace the tasks. What is the procedure to trace it?

    I have one doubt. If any data comes at UART rx pin When the processor is executing highest priority interrupt(GPIO) will the data be lost or can UART retrieve that data after highest priority interrupt execution is completed?

    Thank you.

  • Hello Balaji,

    I have a hunch about the problem with your implementation. 

    First though, regarding the system halting when you set priorities differently:

    1) To set the HWI priority level you would need to configure that at a TM4C specific level. The TI-RTOS Kernel should not be adjusted in SysConfig to do this.

    2) I think setting the HWI priority in TI-RTOS to something else is probably crashing/halting the system - especially given priority 0 is for Idle Task and other low priority tasks/SWI.

    Now going back to your original setup and issue...

    If you don't have a SWI or Task for UART5, then I assume you are processing the UART data in the HWI. This is not the right architecture - you need to use HWI to trigger a task to run (like via a Semaphore) to handle the data processing. That task should then be able to run without data loss even if the GPIO interrupt is firing at times. I think the issue here is that trying to process this in the HWI is causing problems as that is not what is supposed to be done - HWIs are supposed to be very slim and quick to execute.

    Best Regards,

    Ralph Jacobi