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.

TMS320F28075: UART failure with bit error

Part Number: TMS320F28075


There is an application with TMS32F28075, one UART port was used as RS485, another UART port was used to communicaiton with other MCU. When the RS485 communication cable is in poor contact, all UARTs can't recieve and transit data normally,  even when the error interrupt was clear, all UARTs can't run normally, after reset the MCU's power, they return to normal state, what happen? how to solve the issue? please help me, thanks!

  • Samuel,

    Rather than just clearing the error interrupt try resetting the SCI.  For example:

    if(SciaRegs.SCIRXST.bit.RXERROR==1)
    {
    SciaRegs.SCICTL1.bit.SWRESET=0;//sci software reset
    SciaRegs.SCICTL1.bit.SWRESET=1;//enable again sci
    }

    I hope this helps. If this solves your problem, please click the green "Verified Answer" button. Thanks.

    - Ken

  • hi, Ken:

    Thanks, following is my code, it seems it could not recover the UART and other UART port of 28075.

        if(SciaRegs.SCIRXST.bit.RXERROR)
        {
            DelayCnt++;
            if((SciaRegs.SCICTL2.bit.TXEMPTY == 0) || (DelayCnt > 50))  //50 *กก100ms = 5s
            {
                DelayCnt = 0;
                SciaRegs.SCICTL1.bit.SWRESET = 0;
                asm(" nop");
                SciaRegs.SCICTL1.bit.SWRESET = 1;
            }
        }

  • Samuel,

    This is a strange behavior.  Both SCIs should be independent and an error on one SCI should not cause the other SCI to stop communicating properly unless the error on one SCI has caused the CPU to not service an interrupt on the other SCI.  Could you please let me know:

    1. Are you seeing the bit error status on both SCIs?

    2. Which SCI is resetting?  Is it the one used as RS-485 or the other SCI which should have been working normally?  Can you reset both and check if that fixes the issue?

    3. Does a debug reset from CCS fix the issue?

    - Ken