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.

TMS320F28386S: Uart Error

Part Number: TMS320F28386S
Other Parts Discussed in Thread: C2000WARE

Hi,

What i should do in case of Error

uint16_t rxStatus = SCI_getRxStatus(SCIA_BASE);

  if( rxStatus & SCI_RXSTATUS_ERROR ){

}

advice

  • Hi Asaf,

    Error can be due to multiple reasons, usually in our sample code that we provide with C2000Ware, we halt the code there with an ESTOP and direct users to check for the specific error that is there in the system. Based on the error, you can analyze the code / hardware and debug accordingly.

            rxStatus = SCI_getRxStatus(SCIA_BASE);
            if((rxStatus & SCI_RXSTATUS_ERROR) != 0)
            {
                //
                //If Execution stops here there is some error
                //Analyze SCI_getRxStatus() API return value
                //
                ESTOP0;
            }

    Thanks,

    Aditya

  • Hi,

    Usually there is a clear function that clear the error, what is the way to fix that error after i get the reason?

  • The error flags can be cleared using the API - "SCI_performSoftwareReset"

    //*****************************************************************************
    //
    //! Performs a software reset of the SCI and Clears all reported receiver
    //! status flags.
    //!
    //! \param base is the base address of the SCI port.
    //!
    //! This function performs a software reset of the SCI port.  It affects the
    //! operating flags of the SCI, but it neither affects the configuration bits
    //! nor restores the reset values.
    //!
    //! \return None.
    //
    //*****************************************************************************
    static inline void
    SCI_performSoftwareReset(uint32_t base)
    {
        //
        // Check the arguments.
        //
        ASSERT(SCI_isBaseValid(base));
    
        //
        // To clear all errors a sw reset of the module is required
        //
        HWREGH(base + SCI_O_CTL1) &= ~SCI_CTL1_SWRESET;
        HWREGH(base + SCI_O_CTL1) |= SCI_CTL1_SWRESET;
    }
    

    For specific details about the error flags of the SCI Rx registers, you can take a look at the SCIRXST register from the technical reference manual of the device.

    Thanks,
    Aditya

  • Hi,

    what a bout the transition it will be stop if i use this function? 

  • Sorry, what do you mean by transition will stop the function? Can you please elaborate?

  • Hi,

    i transmit and receive in same time

    i want to know if the Transmit will be stop while call function SCI_performSoftwareReset

  • Asaf,

    The software reset only clears the SCI flags. It won't affect the configuration registers and the Tx operation.