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.

Change the baud speed, need it fixed today!

Here's the code I am currently using:

I am currently working at 9600 baud, I need to get it to 115200 band. The formula doesn't work for me trying to change the speed, and I really need it working today . If you wish to explain it awesome, but I really need the numbers to make it work today, today is the day....TODAY! lol

What do I change the last two lines too, to get 115200 speed.

Thanks

//F28377D

 // SCIA at 9600 baud .  (<--want to reach 115200 baud)

   // @LSPCLK = 50 MHz (200 MHz SYSCLK) HBAUD = 0x02 and LBAUD = 0x8B.

   ScibRegs.SCIHBAUD.all = 0x0002;

   ScibRegs.SCILBAUD.all = 0x008B;

  • If your LSPCLK is at 50MHz, then BRR=LSPCLK/(115200 x 8) - 1
    so BRR is ~53
    so SCIHBAUD should be 0x0000
    and SCILBAUD should be 0x0035

    This will not be precisely 115200 but close

    because speed = LSPCLK/((BRR+1)*8)

    so a BRR of 53 will give you 115741 baud (closest)

    and a BRR of 54 will give you 113636 baud