cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

LIN Slave Reports Incorrect Message ID - KBA228178

Employee

LIN Slave Reports Incorrect Message ID - KBA228178

Author: IhorS_86           Version: **

Translation - Japanese: LINスレーブが不正なメッセージIDを報告する - KBA228178 - Community Translated (JA)

Question:

When selecting the LIN2.0 specification compatibility, why does the LIN slave report an incorrect message ID, where the LSB and MSB are swapped in the slave response? How do I fix it?

Answer:

There is a defect in the generated LIN.c source code file. This error can be fixed as follows:

In the LIN.c file, find the following code:

/*D1= Message ID LSB */
LINS_srfBuffer[LINS_PDU_D1_IDX] =
HI8(messageIdTable[tempStatus]);

/* D2 = Message ID MSB */
LINS_srfBuffer[LINS_PDU_D2_IDX] =
LO8(messageIdTable[tempStatus]);

Swap the HI8() and LO8() functions, so that LSB is LO8 and MSB is HI8.

IMPORTANT: The LIN.c file is a generated file, and it is overwritten each time you build the application. Therefore, you must re-edit the LIN.c file every time you build or generate code.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Aug 25, 2019 11:28 PM
Updated by:
 
Contributors