Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F28P650DK: uart_ex1_echoback example.

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE

Hi,

 The example uart in C2000Ware_5_00_00_00 does not have a syscfg file associated with it. When testing the firmware I noticed that characters are transmitted correctly, however they are not received. Has anyone successfully tested the F28P650 uart?

The uart is a new and very important peripheral, so I expected more examples on C2000Ware.

Ari.

  • Hi,

    I used sysconfg to generate code for UART0 and disabled fifo. In the interrupt routine below, interrupt occurs only for the first character received.

    __interrupt void INT_myUART0_ISR(void)
    {
    UART_clearInterruptStatus(myUART0_BASE, 0xFFFF);
    rxdata = HWREG(UARTA_BASE + UART_O_DR);
    UART_writeChar(UARTA_BASE, rxdata);
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP8);
    }

    In the routine in the main loop below, it works correctly. For each character received it is echoed back.

    while(1)
    {
    rxdata = UART_readChar(UARTA_BASE);
    UART_writeChar(UARTA_BASE, rxdata);
    }

    Why does the interrupt only occur once?

  • Hi Ari,

    Have you made sure to clear any related interrupt flags? Typically if you are stuck where it won't trigger again (or it triggers repeatedly) interrupt flags were not cleared properly.

    Here's a FAQ that can help walk through the issue too:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1031947/faq-my-c2000-sci-is-not-transmitting-and-or-receiving-data-correctly-how-do-i-fix-this

    Regards,

    Vince

  • Vince,

     The problem is that I am using the new UART, which is exclusive to the new F28P65x, and there is no working example of it in C2000ware!
    The link you sent me is about SCI and the firmware is bitfield based. I need a code example on how to process receiving data from the ISR on the new UART using Driverlib.

    Thanks,

     Ari.

  • Hi Ari,

    My comments above still stand, the issue is typically related to not properly clearing the interrupt flags.

    And the FAQ can be used for any of the "UART-capable" modules, but is tailored specifically for SCI (mentions some registers here and there).

      

    Also, the latest C2000Ware does have a UART example, have you downloaded the latest version?

    Regards,

    Vince

  • Vince,

    the uart_ex1_echoback example is the only example for the UART, and this example does not work, if you look at the ISR code of this example, the PIEACK was not cleared, so this example was probably not tested by Texas. 


    What could cause this kind of problem would be not clearing the PIEACK, however I verified that the PIEACK register is being cleared after the "Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP8);"  command.

    I also noticed that CCS does not show the list of UART registers. I believe it still hasn't been properly updated for the new peripheral.

    Could you check internally at Texas if they are working on better support for the UART, with more examples, and with the CCS showing the internal UART registers?

  • Hi Ari,

    Thanks for your follow-up. I've submitted a but based on your information along to the software experts, who will fix this in one of the next releases.

    I do know that additional examples for UART (including DMA usage) will be in a future release. But I have emphasized the fact that the existing example is currently broken.

    Regards,

    Vince