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.

TMS320F28388D: SCI RX strings longer than 16 bytes some chars a re getting lost

Part Number: TMS320F28388D

Tool/software:

hello,

Im trying to use the SCI with baud rate of 892857 and I use the RX interrupt to fill a cyclic buffer from the RXFIFO the RXFIFO size I defined is 16.

I am transmitting this string: "abcdefghijklmnopqrstuvwxyz" which is a 26 length string.

the interrupt jumps and inside the interrupt I copy the 16 bytes to a cyclic buffer.

I can see that the first 16 bytes are copied but the rest bytes are getting lost.

is it possible to catch all the bytes if I transmit them together? or it is possible to work with only 16 bytes of string every time?

in this case the size is 26 so it will be 16 and then 10 and the 10 will not trigger the interrupt but I also tried to use a 32 length array and it didnt work well...  so I ask if it is possible that the interrupt occurs twice and is it possible to copy the FIFO to a cyclic buffer? or anyway the rest of the data beyond the first 16 bytes will be lost?

thanks

  • Hello,

    The simplest solution to your problem is to use the built-in SCI_readCharArray(); driverlib function in your ISR. Based on your description of the issue, is that not working?

    Regards,
    Jason Osborn

  • thanks I found what the problem was.

    I actually dont use the SCI_readCharArray() function because I need to also update acyclic buffer s I read it byte after byte in a for lop from 0-16.

    I use the SCI_readCharNonBlocking() function.

    anyway the problem was because in the code I used the init sequencr of the SCI was not exactly like in the exmaples code for some reason they used the 

    SCI_enableInterrupt(SCIA_BASE, (SCI_INTRXFF | SCI_INT_RXERR))

    and in the interrupt end they cleared the SCI_INT_RXERR

    when I removed those lines the problem was solved and the second burst also arrived.

    I dont know why this was happening but this solved the problem.

    thanks