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.

TMS320F28P659DK-Q1: SCI: Receiving incorrect data

Part Number: TMS320F28P659DK-Q1

Hi,

I configure SCI-B on a P659DK8 to communicate with 9600 baud, no parity, one stop bit. The transmission works flawless, every byte is transmitted with 10 bits (one start bit, 8 data bits and one stop bit).

One the receiving side, a FTDI to USB adapter is used to respond. According to the logic analyzer, the data is also send with 10 bits per byte.

  • Both on the receiving end and the transmitting and, the logicalyser uses the same decoder settings and decodes the stream with 10 bits per byte
  • Measing the baudrate over the transmitting package (32 bytes) and the receiving side (10 bytes), reveiles the very same baudrate of 9600.4 baud

However, the µC seems to interpret the incomming data stream incorrectly. When I look at the receiving data on the line and compare that with the data that is actually received by the SCI peripheral, the data is shifted by one bit per byte. 

The peripheral seems to not expect a stop bit.

I have not seen any register configuration, that would describe the different behavior on the transmitting and receiving side of the peripheral. I have not found any errata that would describe this issue, I've read the "My C2000 SCI is not Transmitting and/or Receiving data correctly, how do I fix this?" FAQ.

What could be the problem here?

Best regards
Torsten

P.S.:

I've measured the transmission baudrate, by measuring from the start of the first start bit until the start of the last stop bit. The transmitted data contains 32 bytes, so the entired seqence has 319 bits. The measure sequence length is 33227µs. => 104.16µs

Same on the receiving side: 10 bytes are transmitted, length of the entire period is 10312µs => 104.16µs

One the receiving side, one the wire I see the byte sequence: 0x00, 0x02, 0x01, 0x01, 0x05, 0x25, 0xB3, 0x83, 0xFE, 0x00. The C2000 SCI peripheral, however only received 9 bytes: 0x00, 0x81, 0x40, 0xA0, 0x50, 0x69, 0x1b, 0xf3, 0x00

When I compare the first 5 bytes, it seems like the first byte is received correctly, the second one is shifted by one bit, the third by 2 and so on:

0000 0000, 0100 0000, 1000 0000, 1000 0000, 1010 0000
0000 0000, 1000 0001, 0000 0010, 0000 0101, 0000 1010

 

  • Hi,

    The expert is currently out of office. Please expect a delay in response until they return next week. 

    Kind regards,
    AJ Favela 

  • Hi Torsten,

    Apologies for the delay. Can you check if there are any error flags raised in the SCIRXST register? I suspect that there is a framing error happening based on your description.

    Also, what LSPCLK frequency do you have configured? That will tell us the known error between the expected vs. actual baud rate the device can hit. 

    Best Regards,

    Delaney

  • Hello Delaney,

    there where no error flags being set. I tested with 9600 baud. Setting LSPCLKDIV to 14 and BBR to 185.

    Meanwhile, I changed my code to make use of the FIFO and now it works without changing anything else. Do you have tests that would cover the usage of the peripheral without FIFO?

    For me, the issue can be closed, as I found a solution that works and is hopefully portable to other C2000 derivates.

    best regards 

    Torsten