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.

MSPM0G3507: MSPM0 uart_callback example with FreeRTOS | UART interrupt always get triggered

Part Number: MSPM0G3507

Tool/software:

Hello TI expert,

When I play with LP_MSPM0G3507 launch pad on uart_callback_freertos_ticlang example. I encounter a problem and don't understand.

Why uart interrupt always get triggered? indeed TX and RX line are clean.

CCS Version: 12.7.1.00001 

MSPM0 sdk version: mspm0_sdk_2_01_00_03

example: C:\ti\mspm0_sdk_2_01_00_03\examples\rtos\LP_MSPM0G3507\drivers\uart_echo

the code could be executed and echo function works well as below.

However, when I put a breakpoint at UART0_IRQHandler(void) function, it always get triggered. as shown below

seems like DMA related flag always being set.

then I put a breakpoint at xPortSysTickHandler(void). it never get triggered. seems like system tick preempted by UART interrupt.

How could explain this?

  • Hi, 

    now, your M0's IIDX = 17, it's a DMA DONE on RX event.

    It seems function [UARTMSP_interruptHandler] in file [UARTMSPM0.c] didn't clear the interrupt pending bit.

    You can add a line as below at bottom of [UARTMSP_interruptHandler] to clear all the interrupt or status.

    Fullscreen
    1
    2
    3
    4
    5
    DL_UART_clearInterruptStatus(hwAttrs->regs, 0x1FFFF);
    or
    DL_UART_clearInterruptStatus(hwAttrs->regs, status);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Helic

  • Hi Hellic,

    Thanks for your attention. 

    1 now, your M0's IIDX = 17, it's a DMA DONE on RX event. 

      --> Did you mean, IIDX = 10h, not 17  

    2  And I followed your suggestion. add the code below UARTMSP_interruptHandler . ( did slight modification).

    However it can't even show the Echoing... string, just print E.

     

  • Hi, 

    1 now, your M0's IIDX = 17, it's a DMA DONE on RX event. 

    Yes, It's my mistake. It should be DMA Done on Rx or TX.

    However it can't even show the Echoing... string, just print E.

    After you clear all the interrupt status, there may cause this.

    You can try to clear an single bit flag after entering the corresponding interrupt processing function.

    Regards,

    Helic

  • Hi Helic,

    1 these code are provided by UART driver library, does it mean UART interrupt handler doesn't handle DMA  related interrupt event properly.

    2 I also tried UART_NO_DMA macro and modified UARTObject[] in ti_drivers_config.c. However, it doesn't help. 

    3 can you help me try on your side. is it my own problem or  is a common problem.

    4 since you guys are more familiar with driver library code, if it needs some modification, its better make change on your side.

  • Hi, 

    It's quite busy recently.

    I'll try debugging it as soon as I have time.

    From my guess, this demo does not handle the interrupt flag properly.

    Regards,

    Helic

  • Hi Helic,

    I have a project in solution selection stage, when you have some progress, please let me know. Very appreciate

  • Hi, 

    I have run the latest SDK 2.02 and 2.01, both seems always trigger DMA_Done_Rx interrupt.

    Regards,

    Helic

  • Hi, 

    I contacted the software team and it looks like this is an issue.

    This weekend's SDK release will fix this issue. 

    Please be patient for updates.

    Regards,

    Helic

  • Hi Helic,

    Thanks for letting me know