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.

TMS320F280049: pausing SCI FIFO for flow control

Part Number: TMS320F280049

I am using the SCI with FIFO.  I need a way to stop/start transmission for flow control.  Since there is no flow control on the SCI I have connected the RTS input to eCAP ISR but I have not found a way to pause transmission and restart at the same point in the FIFO buffer. 

So far I have tried the following.

1.   SCI_DisableFIFO()  which resets the fifo pointers so cannot resume transmission at the same location.

2. clearing the SCICTL1.TXENA.  This keeps running until the FIFO is empty.

3. SCI_disableModule() Ignores the delayed transfer settings and immediately sends another byte.  

Any suggestions?

Thanks

  • Hi DTruex,

    I don't think there is a good way to do this with the in-built HW in the SCI module. 

    The most direct solution would be to disable the FIFO or reduce the FIFO depth to a level that is acceptable. 

    The LIN module (which has an SCI mode) on the device appears to have the same functionality (transmit buffer is flushed in case TX is disabled) but the module has CLA integration.  If the CLA has spare bandwidth, you could probably have the CLA control the TX flow of the LIN in SCI mode to implement your desired functionality.  

  • Devin,

    Thanks for confirming I wasn't overlooking something.  The CLA is 85% busy running field oriented motor control so not an option for this application but interesting idea.  

    I'm loading the FIFO from a circular buffer I have reserved 16 bytes on the end of the buffer.  When the RTS goes hi I read the FIFO status bits and subtract from my circular buffer pointer so it points to the data that are stuck in the FIFO.  When the FIFO is re-enabled the bytes that were 'lost' when the FIFO was disabled are reloaded for transmission.  Little kludgy but seems to be working.

    Thanks