LIN Example S32K344 questions

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

LIN Example S32K344 questions

跳至解决方案
2,589 次查看
nxp_user001123
Contributor III

Hi,

Situation is as the following:

-> currently using : S32K3X4EVB-T172 evaluation board

-> installed S32DS, SDK, LIN Stack, RTD, ... 

Then I want to use the LIN_Master example "Lin_Master_S32K344_Example_DS" and configured my board with S32DS but at compiling the project, it is missing the following files:

"lin_stack_cfg.h"
 "lin_common_api.h"
"lin_commontl_api.h"
"lin_diagnostic_service.h"

Do you have any idea where the files come from? Are they generated out from a .ldf file (in S32DS?) 

 

Thanks in advance.

0 项奖励
回复
1 解答
2,448 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

PMC is configured in
PetrS_0-1730289979009.png

With above setting I was able to pass outlined code when set VDD_HV_A to 3.3V using J18.2-3 jumper setting.
Or if V15_MCU is sourced from ballast transistor using J31.2-3.

BR, Petr

在原帖中查看解决方案

7 回复数
2,471 次查看
nxp_user001123
Contributor III

Hello All,

So finally we can build the LIN example. The next problem is that the MCU is not getting over a generated/configured function in the file : "Power_Ip_PMC.c" in function "Power_Ip_PMC_PowerInit" exactly in this piece of code (highlighted line, line number 304):

 

 

Screenshot 2024-10-29 085741.jpg

If we go with debugger over the highlighted line , we are in some kind of deadlock/reset loop of the S32K3. Debugger is not working, we can not reset MCU. So we have to erease the whole memory of the chip with J-Flash Lite. 


If we do this again with the debugger and just set "ConfigValue" (before execution in line 304) just to "0" we have a normal run.

 

Can anyone explain why? And where exactly we can find the configuration menu for this ConfigValue in S32DS? What is a optimal configuration for this register?

Thanks in advance.

 

0 项奖励
回复
2,449 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

PMC is configured in
PetrS_0-1730289979009.png

With above setting I was able to pass outlined code when set VDD_HV_A to 3.3V using J18.2-3 jumper setting.
Or if V15_MCU is sourced from ballast transistor using J31.2-3.

BR, Petr

2,423 次查看
nxp_user001123
Contributor III
Thanks a lot.
0 项奖励
回复
2,549 次查看
nxp_user001123
Contributor III

Hi,

I tried to change the .mex file as you mentioned but I still got the same issue:

../src/main.c:30:10: fatal error: lin_stack_cfg.h: No such file or directory
   30 | #include "lin_stack_cfg.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

 

What I did: 

- Deleted old LIN example

- Opened LIN example again (with S32DS)

- Closed S32DS 

- Changed mex file as you mentioned

- Opened S32DS 

- Clicked on LIN example / Opened Configuration Tools

- Switched to my Package S32K344_172HDQFP

- Updated Code

 

--> Then I tried to build the whole project, where I got the error from above.

0 项奖励
回复
2,560 次查看
nxp_user001123
Contributor III

Hi Petr,

Thanks a lot I will try. Can you help me where I can get the LinStack user manual? I just found LPUART and LIN with RTD - Training...

 

0 项奖励
回复
2,554 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it is part of linstack installation. On my RTD4.0.0 and linstack 2.0.4
c:\NXP\S32DS.3.5_RTD400\S32DS\software\PlatformSDK_S32K3\stacks\lin\documentation\LIN_UserManual.pdf

BR, Petr

0 项奖励
回复
2,565 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I was able to built example following below steps.

-just open/create example
-modify mex file in external editor before opening in S32DS, search for src\LIN21.ldf and change it to src/LIN21.ldf
- do a code update and allow changes for generated LinIf.h and LInIf.c as described in LINStack user manual chapter 6 Known issues and limitations

Then project can be built and elf generated

BR, Petr

0 项奖励
回复