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/TMS570LS1224: LIN driver

Expert 1660 points
Part Number: TMS570LS1224

Tool/software: Code Composer Studio

Hello everyone

I followed the LIN loop-back example code for LIN under HALCoGen examples for TMS570LC4357 MCU .

could anyone explain the below header. whats the value for each sync break field, sync field and identifier

i have struggles in setting syn break field value

    /*Send lin header including sync break field, sync field and identifier. */
    linSendHeader(linREG, 0x28);

  • Hello,

    The LIN header consists of sync break, sync field, and ID field.

    Sync break: 13~20 dominate bits (LOW) + 1~4 recessive bits (HIGH) as delimiter

    Sync field: 1 start bit (LOW) + 0x55 + 1 stop bit (HIGH)

    ID field: 1 start bit (LOW) + 8 bit ID + 1 stop bit (HIGH).

    linSendHeader() is used to set ID. ID BYTE = 0x28 which is LIN message ID.

    On a master node, a write to LIN ID initiates a header transmission.

  • hello QJ,

    Thanks for your explanation .

    to ensure my understanding you mean that Sync break is 0x0001,Sync field is 0x55 which both are set by a master node?

    you mentioned that 0x28 is the ID .not PID? 

    how about checksum in the response ?

  • Hello,

    It is IDBYTE in LINID register.

    ID parity should be calculated manually in your transmitting code using the following formula:

    The checksum byte is automatically generated by the checksum calculator and sent after the data fields transmission is finished.