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.

TMS320F2800137: Issue in LIN communication via SCI

Part Number: TMS320F2800137


Tool/software:

I am using TMS320F2800137 in that I need to establish an LIN communication using an transceiver via SCI peripheral.

In SCI i can able to send and receive data without any issues but If i used LIN Transceiver and establish LIN communication in that i am experiencing issue like Controller is returning Frame error for Break field in LIN header and data received also not valid. After the frame error device SCI peripheral seems to be halted since it is not receiving anything after that. 

How could I resolve this issue and establish LIN communication via SCI?

Do you have any resource or reference for LIN Communication establishment via SCI? If so could you please share those documentation?

Please help me in resolving this issue as early as possible

  • Hello,

    To clarify, are you using the SCI peripheral on F2800137 in order to carry out LIN communication protocol since there is no LIN peripheral on F280013x? Is there a reason you are not using a device with the dedicated LIN peripheral present?

    How are you configuring the SCI to do LIN protocol? Are you using the F2800137 SCI as a commander or responder node? I'd like to know more details on your SCI setup and how you are handling sync break, ID, etc. If you could please provide more context, that would be helpful.

    Best Regards,

    Allison

  • Yes I'm using SCI peripheral to establish LIN communication.



    This is my configuration on SCI peripheral and reading data using SCI_readCharArray. Just started to read data via lin. I used LIN analyzer tool to send data. 



    F2800137 SCI as a responder node. 

  • Hi Uma,

    Thank you for clarifying that you are using F2800137 SCI as a LIN responder node. Since this is a responder, can I ask how are you taking care of the LIN frame detection? Are you handling the break detect, sync field, ID, etc in software already? I see you marked to "Use Interrupt" and "Use FIFO"; however, there are no FIFO or interrupts enabled. Can you clarify why you are not using FIFO mode and interrupts?

    Best Regards,

    Allison

  • Hi Allison

    I'm not using any handler/ interrupt to detect break field and sync field.
    I'm directly using SCI_readCharArray to read header frame via SCI.

    If I can use any interrupt  or something else means how can I do that or how to handle that ?
    Do you have reference documentation  or some note on this ?
    If so could you please share me those things?

    Regards,
    Uma

  • Hi Uma,

    How long is your break field? If you are just trying to read SCI data, I'd imagine this would cause a break detect error in the C2000 SCI module from the bus remaining low continuously for so long.

    Is your plan to handle the LIN configurations via software? If yes, I have a few suggestions. Please allow another day for me to compile them. Is there a reason you are not using a C2000 device that has a dedicated LIN peripheral available?

    Best Regards,

    Allison

  • Hi Allison,

    Break field is not fixed like it will be more than 13 bits of low signal. 

    Yes i need to handle LIN via software. 

    No there is no specific reason for choosing this ICs.


    Regards,
    Uma

  • Hi Allison,

    Can we do that in this way like configure the SCI - RX as GPIO input pin , enable falling edge interrupt in that and reconfigure that pin as SCI - RX after the break field, and then read data, again configure that pin as GPIO input after data reception and wait for next break.

    Because even if I had enabled frame error and then cleared it via software, SCI peripheral is not waiting for start bit it is giving wrong data but that data was partially similar for the same frame on successive reception.


    regards,
    Uma

  • Hi Uma,

    Yes, you can switch from GPIO to SCI in order to allow for the break field. Let me know if you are using this and successfully set up the break field detect.

    I have not implemented this myself since we have many C2000 devices with a dedicated LIN peripheral, but I was also thinking you could try to use software to implement a state machine to track the LIN frame reception. 

    For example:

    • IDLE: waiting for break field
    • BREAK: break detected, waiting for sync field
    • SYNC: sync field received, waiting for ID
    • ID: ID received, check if response is needed
    • RESPONSE: send response data if ID matches

    Best Regards,

    Allison

  • Hi Allison, 

    If possible can you try to establish Lin at your work bench too?

    Regards,

    Uma

  • Hi Uma,

    Allison is currently out of office and will get back to you as soon as possible. Thank you for your patience.

    Best Regards,

    Aishwarya

  • Hi Allison,

    Adding 500 micro second delay , clearing error status and performing soft reset in SCI.

    these changes resolved my issue.
    Now I can establish LIN without any issues.

    Thank you for your support

    Regards,
    Uma