LIN FSL_LIN_2.x_STACK_Package_4.5.9 Issue if signal is split in multiple bytes

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LIN FSL_LIN_2.x_STACK_Package_4.5.9 Issue if signal is split in multiple bytes

2,233件の閲覧回数
salmanshaikh
Contributor II

I am using LIN FSL_LIN_2.x_STACK_Package_4.5.9 package to implement a master LIN node on J2602. I am using ldf file provided by client for which I am facing issue in reading and writing lin_pFrameBuf using l_u8_rd(X) and l_u8_wr(X) functions.

For Sample, I have updated 'Demo_Cluster1.ldf' and added Test_Signal_1(5 bit) and Test_Signal_2(5 bit) from Slave2 to Gateway1. In Cluster1Slave2Info frame, I have added test signals as follows:

 Cluster1Slave2Info : 0x7, Slave2 , 4 {
   Cluster1Potentiometer2, 0;
   Cluster1Slave2Error , 8;
   Test_Signal_1,16; //Added for Testing
   Test_Signal_2,21; //Added for Testing
}

I created cfg.h file using NCFTool, Test_Signal_2 is splitted between byte 16 and byte 17. But while reading and writing to this data, only byte 16 is used.

#define LIN_BYTE_OFFSET_LI1_Test_Signal_2 16
#define LIN_BIT_OFFSET_LI1_Test_Signal_2 5
#define LIN_SIGNAL_SIZE_LI1_Test_Signal_2 5
#define LIN_FLAG_BYTE_OFFSET_LI1_Test_Signal_2 6
#define LIN_FLAG_BIT_OFFSET_LI1_Test_Signal_2 3
#define LIN_FLAG_UPDATE_BYTE_OFFSET_LI1_Test_Signal_2 8

/* static access macros for signal LI1_Test_Signal_2 */

#define l_u8_rd_LI1_Test_Signal_2() \
((l_u8) ((lin_pFrameBuf[LIN_BYTE_OFFSET_LI1_Test_Signal_2] & \
(((1U << LIN_SIGNAL_SIZE_LI1_Test_Signal_2) - 1) \
<< LIN_BIT_OFFSET_LI1_Test_Signal_2 )) >> LIN_BIT_OFFSET_LI1_Test_Signal_2))
#define l_u8_wr_LI1_Test_Signal_2(A) \
{lin_pFrameBuf[LIN_BYTE_OFFSET_LI1_Test_Signal_2] = \
((l_u8) (((l_u8) (lin_pFrameBuf[LIN_BYTE_OFFSET_LI1_Test_Signal_2] & \
((l_u8) (~(((1U << LIN_SIGNAL_SIZE_LI1_Test_Signal_2) - 1) << LIN_BIT_OFFSET_LI1_Test_Signal_2))))) | \
((l_u8) ((((1U << LIN_SIGNAL_SIZE_LI1_Test_Signal_2) - 1) & (A)) << LIN_BIT_OFFSET_LI1_Test_Signal_2))));\
lin_frame_flag_tbl[LIN_FLAG_UPDATE_BYTE_OFFSET_LI1_Test_Signal_2] = 1;}

I have attached the file i had used.

0 件の賞賛
返信
4 返答(返信)

1,779件の閲覧回数
vikasmalik22
Contributor II

Hi Daniel,

I am unable to get the Lin Stack v4.6.0 from above link.

Can you please share a working link from where I can download the latest Lin Stack. 

Thanks,

Vikas

0 件の賞賛
返信

1,779件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Salman,

This is a bug in the FSL_LIN_2.x_STACK 4.5.9 and it will be fixed in the next release.

Thank you for the report.

Regards,

Daniel

0 件の賞賛
返信

1,779件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Salman,

I would like to inform you that Lin Stack v4.6.0 is now available at the address below.
https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW-LIN2X-J2602-D

Regards,
Daniel

0 件の賞賛
返信

1,779件の閲覧回数
vikasmalik22
Contributor II

Hi Daniel,

 

I am currently using Lin Stack v4.5.9 and facing some issues. I am unable to get the Lin Stack v4.6.0 from above link.

 

Can you please share a working link from where I can download the latest Lin Stack. 

 

Thanks,

Vikas

0 件の賞賛
返信