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.

MCU-PLUS-SDK-AM243X: UART Interrupt disabled

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: TMDS243EVM

Hi support team,

We're using the board TMDS243EVM with SDK 8.5 on which we applied the workaround coming from SDK 8.6 for the issue i2310 (USART: Erroneous clear/trigger of timeout interrupt).

We have a CLI application that looks to work find just after being started.
This application echoes the character typed in the serial terminal.

But after a while, the CLI application looks frozen.

After investigation in "uart_v0.c", I can see the interrupts are in Disabled state and as a result UART_controllerIsr() is no more called.

Have you noticed this kind of issue on your side?

When it works (before being blocked), I noticed in UART_controllerIsr(), a Rx Timeout is detected in UART0_MEM_IIR_UART (Interrupt Identification Register) with IT_TYPE set to 0x6 (bits 3 and 2 are set) each time a character is received (bit 2 is set for RHR Interrupt).
The register UART0_MEM_EFR2 value is 0x00000000: TIMEOUT_BEHAVE == 0h (Timeout after at least one character has been received).

Is this configuration correct?
It could explain the Rx Timeout detected in UART_controllerIsr().

I also noticed the workaround for i2310 (UART_i2310WA(attrs->baseAddr);) is never called in UART_controllerIsr().

Thanks for your help.

Best regards,

Ludovic

  • Hi Ludovic,

    Which UART echo example your CLI application is based on? Are you using interrupt, polling, DMA or the low latency examples? Are you using UART FIFO?

    I modified the echo UART examples: uart_echo_am243x-evm_r5fss0-0_nortos_ti-arm-clang, uart_echo_callback_am243x-evm_r5fss0-0_nortos_ti-arm-clang and uart_echo_dma_am243x-evm_r5fss0-0_nortos_ti-arm-clang to do the infinite loop on echoing. I never have such failure you described.

    I am using the AM243x EVM and MCU+ SDK 08.06.00.43.

    The Rx Timeout interrupt happens when:

    Best regards,

    Ming

  • Hi Ming,

    My application is using UART in Interrupt mode and UART FIFO.

    My application is not based on demo application from TI, but...

    I could reproduce the problem with a demo application (uart_echo_am243x-evm_r5fss0-0_freertos_ti-arm-clang) I modified to echo 1 character in loop.

    For this, I'm using SDK 8.5 so basically, the workaround for i2310 is not applied for this test.


    This is my configuration:

    This is the exported project if you whish to try it:

    uart_echo_am243x-evm_r5fss0-0_freertos_ti-arm-clang_MODIFED_WITH_INFINITE_LOOP.zip

    And the Serial Logs:

    ▒
    Starting NULL Bootloader ...
    
    DMSC Firmware Version 8.5.3--v08.05.03 (Chill Capybar
    DMSC Firmware revision 0x8
    DMSC ABI revision 3.1
    
    INFO: Bootloader_runCpu:155: CPU r5f1-0  is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU m4f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 800000000 Hz !!!
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-1 is initialized to 800000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...
    
    
    # k
    # s
    # d
    # f
    # o
    # l
    # e
    # z
    # r
    # o
    #
    

    I don't know why, but if I always type the same character I can't see the problem.

    If I type randomly and quickly several character the program freezes.

    Best regards,

    Ludovic

  • Same result after I applied the workaround for i2310 issue in ....\source\drivers\uart\v0\uart_v0.c

  • Hi Ludovic,

    I can reproduce your reported issue on the MCU+ SDK (08.06.00.43) UART example: uart_echo_am243x-evm_r5fss0-0_freertos_ti-arm-clang. It locks up when the two key strokes are really close. My guess is that if the UART read interrupt and the write interrupt are too close to each other, then the lock up could happen. I will file a JIRA ticket for this (MCUSDK-11114).

    Meanwhile, I also tried the same on the uart_echo_callback_am243x-evm_r5fss0-0_freertos_ti-arm-clang. It works fine no matter how fast I type. May be you can use the callback example to re-implement your CLI application as a workaround.

    Best regards,

    Ming