LIN Example S32K344 questions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LIN Example S32K344 questions

Jump to solution
2,605 Views
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 Kudos
Reply
1 Solution
2,464 Views
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

View solution in original post

7 Replies
2,487 Views
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 Kudos
Reply
2,465 Views
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,439 Views
nxp_user001123
Contributor III
Thanks a lot.
0 Kudos
Reply
2,565 Views
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 Kudos
Reply
2,576 Views
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 Kudos
Reply
2,570 Views
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 Kudos
Reply
2,581 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1980886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1980886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3ESituation%20is%20as%20the%20following%3A%3C%2FP%3E%3CP%3E-%26gt%3B%20currently%20using%20%3A%20S32K3X4EVB-T172%20evaluation%20board%3C%2FP%3E%3CP%3E-%26gt%3B%20installed%20S32DS%2C%20SDK%2C%20LIN%20Stack%2C%20RTD%2C%20...%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20I%20want%20to%20use%20the%20LIN_Master%20example%20%22Lin_Master_S32K344_Example_DS%22%20and%20configured%20my%20board%20with%20S32DS%20but%20at%20compiling%20the%20project%2C%20it%20is%20missing%20the%20following%20files%3A%3C%2FP%3E%3CP%3E%22lin_stack_cfg.h%22%3CBR%20%2F%3E%26nbsp%3B%22lin_common_api.h%22%3CBR%20%2F%3E%22lin_commontl_api.h%22%3CBR%20%2F%3E%22lin_diagnostic_service.h%22%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20idea%20where%20the%20files%20come%20from%3F%20Are%20they%20generated%20out%20from%20a%20.ldf%20file%20(in%20S32DS%3F)%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1986907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1986907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThanks%20a%20lot.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EPMC%20is%20configured%20in%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrS_0-1730289979009.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PetrS_0-1730289979009.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307688iB49E8064D1D4DFAA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22PetrS_0-1730289979009.png%22%20alt%3D%22PetrS_0-1730289979009.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWith%20above%20setting%20I%20was%20able%20to%20pass%20outlined%20code%20when%20set%20VDD_HV_A%20to%203.3V%20using%20J18.2-3%20jumper%20setting.%3CBR%20%2F%3EOr%20if%20V15_MCU%20is%20sourced%20from%20ballast%20transistor%20using%20J31.2-3.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1983589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1983589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3ESo%20finally%20we%20can%20build%20the%20LIN%20example.%20The%20next%20problem%20is%20that%20the%20MCU%20is%20not%20getting%20over%20a%20generated%2Fconfigured%20function%20in%20the%20file%20%3A%20%22Power_Ip_PMC.c%22%20in%20function%20%22Power_Ip_PMC_PowerInit%22%20exactly%20in%20this%20piece%20of%20code%20(highlighted%20line%2C%20line%20number%20304)%3A%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202024-10-29%20085741.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202024-10-29%20085741.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307414i095D49A1E4B9F3C3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202024-10-29%20085741.jpg%22%20alt%3D%22Screenshot%202024-10-29%20085741.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIf%20we%20go%20with%20debugger%20over%20the%20highlighted%20line%20%2C%20we%20are%20in%20some%20kind%20of%20deadlock%2Freset%20loop%20of%20the%20S32K3.%20Debugger%20is%20not%20working%2C%20we%20can%20not%20reset%20MCU.%20So%20we%20have%20to%20erease%20the%20whole%20memory%20of%20the%20chip%20with%20J-Flash%20Lite.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIf%20we%20do%20this%20again%20with%20the%20debugger%20and%20just%20set%20%22ConfigValue%22%20(before%20execution%20in%20line%20304)%20just%20to%20%220%22%20we%20have%20a%20normal%20run.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ECan%20anyone%20explain%20why%3F%20And%20where%20exactly%20we%20can%20find%20the%20configuration%20menu%20for%20this%20ConfigValue%20in%20S32DS%3F%20What%20is%20a%20optimal%20configuration%20for%20this%20register%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20in%20advance.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1981177%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1981177%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20tried%20to%20change%20the%20.mex%20file%20as%20you%20mentioned%20but%20I%20still%20got%20the%20same%20issue%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E..%2Fsrc%2Fmain.c%3A30%3A10%3A%20fatal%20error%3A%20lin_stack_cfg.h%3A%20No%20such%20file%20or%20directory%0A%20%20%2030%20%7C%20%23include%20%22lin_stack_cfg.h%22%0A%20%20%20%20%20%20%7C%20%20%20%20%20%20%20%20%20%20%5E~~~~~~~~~~~~~~~~%0Acompilation%20terminated.%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EWhat%20I%20did%3A%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Deleted%20old%20LIN%20example%3C%2FP%3E%3CP%3E-%20Opened%20LIN%20example%20again%20(with%20S32DS)%3C%2FP%3E%3CP%3E-%20Closed%20S32DS%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Changed%20mex%20file%20as%20you%20mentioned%3C%2FP%3E%3CP%3E-%20Opened%20S32DS%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Clicked%20on%20LIN%20example%20%2F%20Opened%20Configuration%20Tools%3C%2FP%3E%3CP%3E-%20Switched%20to%20my%20Package%20S32K344_172HDQFP%3C%2FP%3E%3CP%3E-%20Updated%20Code%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E--%26gt%3B%20Then%20I%20tried%20to%20build%20the%20whole%20project%2C%20where%20I%20got%20the%20error%20from%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1981174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1981174%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eit%20is%20part%20of%20linstack%20installation.%20On%20my%20RTD4.0.0%20and%20linstack%202.0.4%3CBR%20%2F%3Ec%3A%5CNXP%5CS32DS.3.5_RTD400%5CS32DS%5Csoftware%5CPlatformSDK_S32K3%5Cstacks%5Clin%5Cdocumentation%5CLIN_UserManual.pdf%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1981173%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1981173%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Petr%2C%3C%2FP%3E%3CP%3EThanks%20a%20lot%20I%20will%20try.%20Can%20you%20help%20me%20where%20I%20can%20get%20the%20LinStack%20user%20manual%3F%20I%20just%20found%20LPUART%20and%20LIN%20with%20RTD%20-%20Training...%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1981143%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LIN%20Example%20S32K344%20questions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1981143%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20was%20able%20to%20built%20example%20following%20below%20steps.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E-just%20open%2Fcreate%20example%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E-modify%20mex%20file%20in%20external%20editor%20before%20opening%20in%20S32DS%2C%20search%20for%26nbsp%3Bsrc%5CLIN21.ldf%20and%20change%20it%20to%26nbsp%3Bsrc%2FLIN21.ldf%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E-%20do%20a%20code%20update%20and%20allow%20changes%20for%20generated%20LinIf.h%20and%20LInIf.c%20as%20described%20in%20LINStack%20user%20manual%20chapter%26nbsp%3B6%20Known%20issues%20and%20limitations%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThen%20project%20can%20be%20built%20and%20elf%20generated%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBR%2C%20Petr%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E