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.

TMS320F28035: The LIN module is configured in SCI multi-level buffer mode

Part Number: TMS320F28035

Hi team,

Here's an issue from the customer may need your help:

When the LIN module is configured in SCI multi-level buffer mode, the user can set the length of the receive byte (1~8byte). As per the manual, the receive must reach the set 8Byte for the length of 8byte to signal receive complete. Customer have the following questions about this: 

1) The customer triggers the read by receiving the completion flag in the main loop and is prepared to use the multiple buffer mode to prevent data that is not read in time from being overwritten. However, the buffer is full before the receive is sent, so that the customer must read the next data before it is available, which still requires much time.

2) The length of the setup instruction that the customer needs to process is not fixed, for example, it may be 13Byte, after the first 8 byte have been received, the last 5 byte are always dissatisfied. Then the receive complete flag is not issued causing cannot work properly.

3) The length of the buffer is set to 8. According to the manual, the user does not know where to read the receive counter value, that is, the user does not know how many data is stored in the buffer until the reception is full.

The SCI module of the chip has been used, only SCI mode can be used using LIN configuration.

Could you help check if the above understandings are correct? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    1) The customer triggers the read by receiving the completion flag in the main loop and is prepared to use the multiple buffer mode to prevent data that is not read in time from being overwritten. However, the buffer is full before the receive is sent, so that the customer must read the next data before it is available, which still requires much time.

    Later in the thread you mention that the length is set to 8. The RXRDY flag will be set when this much data is received. 

    Snippet of the TRM: "The multi-buffer 3-bit counter counts the data bytes transferred from the SCIRXSHF register to the RDy receive buffers and TDy transmit buffers register to SCITXSHF register. The 3-bit compare register contains the number of data bytes expected to be received or transmitted. the LENGTH value in SCIFORMAT register indicates the expected length and is used to load the 3-bit compare register"

    2) The length of the setup instruction that the customer needs to process is not fixed, for example, it may be 13Byte, after the first 8 byte have been received, the last 5 byte are always dissatisfied. Then the receive complete flag is not issued causing cannot work properly.

    What do you mean by "dissatisfied"?

    3) The length of the buffer is set to 8. According to the manual, the user does not know where to read the receive counter value, that is, the user does not know how many data is stored in the buffer until the reception is full.

    I don't believe there is a way to check how much data is stored in the buffers before the RXRDY bit is set. 

    Best Regards,

    Marlyn