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.

TMS320F28376S: Dealing with a UART output that begins as logic zero

Part Number: TMS320F28376S

Tool/software:

Hello, 

We have a signal that is fed into the SCICRX pin of the F2837xs. The problem is that the transmitting UART that feeds into this pin may not have power applied before data is sent to it, meaning that the signal is a constant zero.

This throws break detect errors in our DSP which prevents further updates of the receiver register and we are unable to process any data once the transmitting device wakes up.

Now, we do not, ideally, want to change hardware to solve this issue. I was thinking that I could disable the UART at startup, setting the GPIO as just a standard GPIO pin. Once this pin reads zero, it will configure the pin as UART, and then read data. Once the GPIO detects a break detect, for example if the transmitting UART powers down again, we will disable UART and set as a standard GPIO pin and clear the break detect flag until the GPIO is set as high again. 

Does this sound suitable? We are intending to receive at high Baud rates, over 1MBaud, and I have read some conflicting information regarding this method and how fast things can be configured in the hardware of the UART.

Is there any preferable technique to improve on the above simple technique?  

Best regards, 

JMH

  • Hi JMH,

    Thank you for your inquiry. I will try to get back to you this week, but please note I am out of office the next few days.

    Best Regards,

    Allison

  • Hi JMH,

    My sincere apologies for some extended delay on this inquiry. 

    So if I'm understanding, you have a C2000 device and another device, and the non-C2000 device is powered off upon start up and continuously powers on and off, interrupting SCI communication. You are trying to prevent the SCI module from getting hung up after the other device powers off.

    This throws break detect errors in our DSP which prevents further updates of the receiver register and we are unable to process any data once the transmitting device wakes up.

    When you receive an RX interrupt, are you checking for if the break detect flag is set? In the RX ISR you can check if the flag is set, then this flag can be cleared with an SCI SWRESET (for example, by calling SCI_clearInterruptStatus() like the below snippet from DriverLib). In this case you would reset the SCI module to resume SCI communication (you can achieve over 1MBaud with this). 

    If you are not okay with receiving break detects continually like the above scenario, then yes I would suggest something like you are describing:

    • Start with enabling SCI
    • When device powers off (or if it is already off upon start up), break detect occurs, so you can disable SCI in the RXISR (by checking for a break detect flag and disabling).
    • When the device powers on again, drive a GPIO high. You can detect the GPIO level or edge and enable SCI.

    Best Regards,

    Allison