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.

TMS320F280049: Why 2 repeat S/W reset in SCI example are needed

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi team,

I am supporting customer to fulfill their SCI configuration code.

When refering example code in C2000ware, here is a detail we noticed:

In sci_ex3_interrupts_fifo there are 2 repeated S/W reset code in the SCI configuration. Could you share more details why this is neccessary?

    //
    // Initialize SCIA and its FIFO.
    //
    SCI_performSoftwareReset(SCIA_BASE);

    //
    // Configure SCIA for echoback.
    //
    SCI_setConfig(SCIA_BASE, 25000000, 9600, (SCI_CONFIG_WLEN_8 |
                                             SCI_CONFIG_STOP_ONE |
                                             SCI_CONFIG_PAR_NONE));
    SCI_resetChannels(SCIA_BASE);
    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
    SCI_enableFIFO(SCIA_BASE);
    SCI_enableModule(SCIA_BASE);
    SCI_performSoftwareReset(SCIA_BASE);

Regards,

Brian

  • Hello Brian,

    Thanks for your question! I will double check to ensure there are no additional reasons, but my understanding of this is that it is done in order to clear any flags that are set between the initialization (which is the first function call of "SCI_performSoftwareReset") and the autobaud lock/starting messages. Essentially, SCICTL1->SWRESET clears the flags without clearing the configuration bits, which is useful in case random incoming data has triggered the flags before we look to lock the baud rate and send our first message. Table 23-9 ("SCICTL1 Register Field Descriptions") in the TRM highlights which flags get cleared on a SWRESET.

    I will follow up with additional clarification if there is any!

    Regards,

    Vince

    ----------------------------------------------------------------------------------------------------------------------------

    If I was able to answer your question, please press the green "Verified" button below, thanks!

  • Hello Brian,

    I was able to follow up with the software team. Please disregard the previous information. The repeated calls are actually not strictly necessary, and will be removed in future releases of the C2000Ware. Thank you for bringing this to our attention, as this is now planned to be corrected in C2000Ware.

    Please see the following related thread regarding this:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/901503

    Regards,

    Vince

    ----------------------------------------------------------------------------------------------------------------------------

    If I was able to answer your question, please press the green "Verified" button below, thanks!

  • Really apprecaite the reply which is pretty clear.

    Regards,

    Brian