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.

TMS320F280025C: SCI Auto baud rate

Part Number: TMS320F280025C

Hi expert,

My customer is using F280025 for a power module, and their customer use different baud rate and they have to achieve this without reset C2000.

They have use “SCI_lockAutobaud(SCIA_BASE)” to do auto band test,  while in initial stage sent a ‘A’ or ‘a’ will activate automatic baud rate mode and if need to change band rate, reset DSP sent the character again in new band rate.

there are some questions:

  1. In the function there are code below:

          // Wait until we correctly read an 'A' or 'a' and lock

           while((HWREGH(base + SCI_O_FFCT) & SCI_FFCT_ABD) != SCI_FFCT_ABD)

       {

       }

      Which means CPU will wait here and do nothing until receive character like ‘A’ or ’a’

Customer try to use “if” replace “while” to let CPU do other task when not receive “A” or ”a” but communication failed;

why is this happen ?

2. can C2000 achieve the function which can identify the baud rate automatic during the whole communication period?

BR

Emma

  • Hi Emma,

    Thanks for your question! Here's my responses to the two questions you mentioned:
    1."while" is needed in order to only allow the next parts of the function to occur after the FFCT has reached the correct value. If you use an "if" statement, it will only check once, and will stop waiting. So "while" is needed.

    2. The C2000 cannot continuously check the baud rate, but it can periodically check. You could occasionally request the other device to send "A" or "a", and then run the "SCI_lockAutobaud" function. Basically, the application would need to choose when to check the baud rate, but it cannot be done constantly/in the background.

    I hope that answers your questions!

    Regards,

    Vince