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.

SCI (RX Buffer) crashes and set to 0 when sending data with a different baudrate as defined in the controller

Other Parts Discussed in Thread: TMS320F28055

Hello guys,

I am using the TMS320F28055 microcontroller.
I have a problem with the UART communication.
I have everything configured for my UART baudrate is 9600, everything runs great and my RX buffer receives everything, an interrupt is also enabled.

If I send data to the controller via my PC (baud rate 9600), everything runs great.

As soon as I set the baud rate of the PC to 1200, for example, and send a few times, my RX buffer from the controller crashes and there is a 0 in it.

If I then set the baud rate back to 9600, the controller would have to receive everything again. But the buffer is then still only 0 and he no longer receives anything.

Does anyone know how to fix the problem so that the RX buffer does not crash even if data is sent with an incorrect baud rate.

Thank you for your help.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void init_RS232()
{
SciaRegs.SCICCR.all = 0b00000111; //0x0007; // 1 stop bit, No loopback
// No parity, 8 char bits,
// async mode, idle-line protocol
SciaRegs.SCICTL1.all = 0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
SciaRegs.SCICTL2.all = 0x0003;
SciaRegs.SCICTL2.bit.TXINTENA = 0;
SciaRegs.SCICTL2.bit.RXBKINTENA = 1;
SciaRegs.SCIHBAUD = 0x0000; // 9600 baud @LSPCLK = 15MHz(60 MHz SYSCLK)
SciaRegs.SCILBAUD = 0x00C2;
SciaRegs.SCICTL1.all = 0x0023; // Relinquish SCI from Reset
EALLOW;
PieVectTable.SCIRXINTA = &Interrupt_SCIa_parameterizationPORT_Isr;
EDIS;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Markus,

    It's possible you are getting a break detect from the data line being pulled low for too long due to the slower baud rate from the transmitter. When a break detect occurs you must reset the SCI module by clearing the SWRESET bit. This function is described in the SCI Control 1 register. You should be able to check if the break detect bit is set during your RX interrupt and reset the SCI module accordingly. Let me know if you have any questions on how to do this.

    Thank you,

    Luke

  • hello luke,
    thanks for your help i solved the problem

  • Hi Markus,

    Glad to know this resolved your issue, I will close this thread.