S32K1xx LIN Stack

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K1xx LIN Stack

642 次查看
Francesco_Solito
Contributor II

Good morning

I tried to setup the lin_slave_s32k118 stack example on my evaluation board and I see the LIN traffic correctly.

What I'm not able to do is:

1) get a slave response to a diagnostic service like 0xB2 (that is included into the example); please note that NAD, PID and FID are ok;

2) change the LDF reference file to a different folder than the SDK installation folder (I would like to use my project folder)

Could you please help me in particular on point 1?

Thank you and kind regards,

Francesco

0 项奖励
3 回复数

565 次查看
nxf78987
NXP Employee
NXP Employee

Hi @Francesco_Solito,

1) get a slave response to a diagnostic service like 0xB2 (that is included into the example); please note that NAD, PID and FID are ok;

=> As far as know, you can use the ld_receive_message() to receive one diagnostic message and store it in the buffer pointed to by user data.

Please refer to chapter 7.4.4.2 of LIN_Specification_2.2A.pdf for more detail.

      

nxf78987_0-1684311895075.png

 

2) change the LDF reference file to a different folder than the SDK installation folder (I would like to use my project folder)

=> Please share with me the software version that you are using. I will recheck this problem on my side.

Best regards,

Dan

0 项奖励

558 次查看
Francesco_Solito
Contributor II

Hello and thank you for your reply.

As regards my point 1: I solved it simply calling ld_init(LI0) before l_ifc_init(LI0). ld_init(LI0) was not present in the main.c of the example project "lin_slave_s32k118".

What I found now is that initial_NAD seems to be used only in 0xB0 service, while for all the other services configured_NAD is used. So, with a CANoe simulation, if I don't perform 0xB0 service at the beginning (in order to switch from initial_NAD to configured_ND), I'm not able to access diagnostic service (because CANoe uses initial_NAD while the lin stack uses configured_NAD). If I use 0xB0 at the beginning everything works correctly then. Is that correct considering the LIN specifications?

As regards my point 2: I'm using

S32DS for S32 Platform v3.5 Build id: 230226 (Update 2)

S32SDK_S32K1XX_RTM_4.0.1

 

Thank you in advance and kind regards,

Francesco

0 项奖励

499 次查看
nxf78987
NXP Employee
NXP Employee

Hi @Francesco_Solito,

What I found now is that initial_NAD seems to be used only in 0xB0 service, while for all the other services configured_NAD is used. So, with a CANoe simulation, if I don't perform 0xB0 service at the beginning (in order to switch from initial_NAD to configured_ND), I'm not able to access diagnostic service (because CANoe uses initial_NAD while the lin stack uses configured_NAD). If I use 0xB0 at the beginning everything works correctly then. Is that correct considering the LIN specifications?

=> You are right. As far as I know, the initial_NAD is only used in 0xB0 service and configured_NAD is used for other services.

You can refer to chapter 4.2.5 of LIN_Specification_2.2A.pdf for more detail.

nxf78987_0-1684906032871.png
nxf78987_1-1684906032872.png
nxf78987_2-1684906032873.png

 

As regards my point 2: I'm using S32DS for S32 Platform v3.5 Build id: 230226 (Update 2)

S32SDK_S32K1XX_RTM_4.0.1

=> The feature as you would expect is not supported in this version of the software. However, this feature has been supported in S32SDK_S32K1XX_RTM_4.0.2. So please update your software version if you need to use this feature.

Best regards,

Dan

0 项奖励