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: LIN SCI Multibuffer Use for Modbus RTU

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello,

Our team is expecting to use the 280049's LIN module in SCI compatibility mode due to requirements for additional SCIs for our product. Can the multi-buffer in the LIN act similar to the FIFO in the SCI module specifically for a Modbus RTU implementation?

Regards,

-Wes

  • The SCIFORMAT register seems to indicate that with multi-buffer set to on, we may be limited to 1-8 characters per message. Is this correct, or is there some way to configure the multi-buffer to allow for more characters? Our SCI logic with FIFOs uses the TXEMPTY interrupt to allow for larger messages to be sent. Is it possible to set the LIN up in a similar way?

  • Hi Wes,

    Yes, you are correct that the limit is 1-8 continuous characters in this case, and there is a similar flag in the LIN module in SCI mode:

    Multi-buffer LIN (in SCI mode) functions similarly to a FIFO in that there are levels to store multiple characters and can trigger interrupts accordingly, but there are a few differences to consider. For example, the LIN buffers are memory mapped, so when you read and write to them you should double check you are reading and writing to the buffers in the correct order - I'd recommend you leverage the driverlib functions (source located in {C2000Ware}\driverlib\f28004x\driverlib\lin.c and lin.h) to help simplify this/take care of this. 

    There are some examples you can reference as well:

    • {C2000Ware}\driverlib\f28004x\examples\lin
      • Example 2: LIN non-multibuffer SCI mode with RX interrupts
      • Example 3: LIN multi-buffer in SCI mode with DMA

    I believe you'll want to use the LIN-SCI interrupts specifically and in the TX ISR use LIN_sendData() and in RX ISR use LIN_getData().

    Hope this helps!

    Best Regards,

    Allison