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.

CCS/TMS320F28035: Some questions about LIN which is used for SCI communication

Part Number: TMS320F28035
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Dear TI engineers:

I have some questions about LIN which would be used for SCI,neither the forum and the example in controlSUITE of C2000 can really help me。

Firstly,which flag can represent the action that data is all read by CPU。The RXRDY bit in SCI Flags Register seems unchanged when the data is read from CPU。

Secondly,what is the different between LINRD0, LINRD1 and SCIRD。Why the last data is in SCIRD and the others are in  LINRD0 and LINRD1 when I send data to 28035?

I'm looking forward to your reply!

coke_kou

  • According to the spec, “RXRDY is cleared by the RESET bit, by an active SW nRESET, a system reset, writing a 1 to this bit, by reading SCIRD in compatibility mode, or by reading last data byte RDy of the response in LIN mode”. 

    Are you saying RXRDY is not cleared even after SCIRD is read by the CPU?

  • Hi Guanying,
    Are you using multi-buffered SCI or non buffered?

    Best,
    Marlyn
  • So glad to hear from you! It seems that the RXRDY bit is cleared when the SCIRD is read by the CPU after I mask the buffer function(LINRD0 and LINRD1)!
    Now, I could receive the whole data。But,the return data is not always the right one which I stipulated。
    For example,I send 0103 E917 0001 0052,the return data should be 0103 0200 00B8 44。However, the return data are 0100 44。Sometimes,the return data is right。
    I do not know what happened?
  • Now, I mask the buffer function。But, these are some other questions happened。
    For example,I send 0103 E917 0001 0052,the return data should be 0103 0200 00B8 44。However, the return data are 0100 44。Sometimes,the return data is right。
    I do not know what happened?
  • Guanying,
    To answer the second question you had posted,
    Because the LIN module does have an SCI core it uses the transmitter data buffer register (SCITD) to load data to the SCITXSHF (transmitter shift register). On the receive side the same thing happens. The receiver data buffer register (SCIRD) contains received data transferred from the receiver shift register (SCIRXSHF). This is why the last data appears to be in SCIRD because that is the latest thing copied over from SCIRXSHF before loading it to LINRD.
    The LINRD and LINTD registers should be used under multi-buffer mode to be able to prefill them with values to be transmitted and then received. The SCITD/SCIRD registers should be directly used when multi-buffered mode is disabled.

    Can you clarify what you mean by "mask the buffer function" please?

    Best Regards,
    Marlyn
  • This question is solved when I mask the data length limit which is 4 before. The length is used in SCI FIFO mode, because of its FIFO deep. When the data is sent one by one without length limit. The data could be sent and received successfully.
    Thank you, Marlyn Rosales Castaneda20 and Hareesh J .
  • Guanying,

    I am glad you were able to resolve your issue. Please let us know if you need anything else.

    Best Regards,

    Marlyn