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.

LIN in SCI multi-buffer mode

Hello,

According to the datasheet, when using LIN module in SCI multi-buffer mode, the transmission is initiated once byte 0 is written (bit TD0 in LINTD0 register). I am doing some tests in loopback mode and the transmission is initiated once either byte 0 or byte 1 are written. Is there a workaround to fix this issue?

Also, I would like to know if in SCI multi-buffer mode the RXRDY flag is set when the buffer of the configured length is full or every time there is a new character in the buffer. From what I understand from the datasheet, the latter is the answer, but I would like to confirm this.

Thanks

  • Juan,

    I have confirmed on the bench the behavior that you are seeing. The issue is that the C28x compiler does a Read/Modify/Write on the register. It is my understanding that this module was ported from another device which has byte addressability. Since the C28x CPU is not able to do this, the compiler will read the full 16-bit address (0x6C3B), OR in the new value to TD1, and then write the full 16-bit word back to the register location. As you are writing to TD0, the next transmission will be initiated, even if you have not explicitly written to TD0. For a workaround, I would recommend building your message in a structure, or temporary variable before writing it to the LINTD0 Register. 

    The SCI in multi-buffer mode will set the RXRDY bit when the programmed number of bytes have been received. i.e. if the multi-buffer mode is selected and the Number of bytes is set to 3, RXRDY will be set when 3 bytes have been received.