S32K144: Porting to S32K142

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

S32K144: Porting to S32K142

Jump to solution
3,784 Views
sripav-7
Contributor III

Hello

I developed all my code on the S32K144 EVAL board. However, the 64-pin version os the 144 MCU is not available in my region, so I have to port the entire code into S32K142. I tried just changing the processor in config. At first, it seems to be fine but I see two processors with the same name (Cpu:S32K142_64) under components->processors with one of the two is greyed. Also, RAM and FLASH appear under Generator_configurations with an "x" on RAM. After deleting the grey processor, if I double click on RAM, these errors popup:

"adc_pal.chg:undefined CPUfamily" and "adc_pal.chg:undefined CPUType".

Can someone explain to me what is happening? How do I fix this and port my code to that S32K142? I attached my project from S32K144 with this post.

Thank you,

Sri Harsha Pavuluri

Labels (2)
1 Solution
3,093 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you were using startup and linker files for S32K144. Here is step by step howto change package layout/family: 

HOWTO: Change the CPU Derivative in an SDK-Based Application Project 

In attachment is updated your project - unfortunately I have only S32K142 100 pin version and tested your project with this part (works okay - I can get into main). In the attached project is package switched back 64 pin version with fixed paths and so on - but untested with HW. 

Jiri

View solution in original post

6 Replies
3,093 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you are doing it right. The CPU change should be enough. For some reason - the ADC is complaining for CPU Family. 

I removed ADC_PAL and add it again and fixed some missing paths. Basically - I renamed the project (by pressing F2 key when project name is active) - and  S32DS fixed paths automatically  but this is kind of workaround. 

Anyway - the SDK team will probably add some additional info. In my opinion CPU change should work without any additional user steps. 

In attachment is updated project - there is missing ADC settings (I left the default one) - just add it by yourself. 

Jiri 

3,093 Views
sripav-7
Contributor III

Hi Jiri.

I did the same thing as you said to my project and it doesn't work for some reason. I get this while debugging:

pastedImage_1.png

Additionally, I also get these warnings:

pastedImage_2.png

0 Kudos
Reply
3,093 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

your program ends in exception for some reason (watchdog/clocking?). Are you able reach main function? Just try to figure out when the exception occurs. Invalid paths warning is okay - you can remove them from project settings. If it is possible you can share your project, I'll look at it.  

Jiri 

0 Kudos
Reply
3,093 Views
sripav-7
Contributor III

It isn't reaching the main function for some reason and I don't know where the problem is. Here is the project:

ExpireBox | pwrctrl.zip 

0 Kudos
Reply
3,094 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you were using startup and linker files for S32K144. Here is step by step howto change package layout/family: 

HOWTO: Change the CPU Derivative in an SDK-Based Application Project 

In attachment is updated your project - unfortunately I have only S32K142 100 pin version and tested your project with this part (works okay - I can get into main). In the attached project is package switched back 64 pin version with fixed paths and so on - but untested with HW. 

Jiri

3,093 Views
sripav-7
Contributor III

Thank you so much. I created a new project and reconfigured it a few minutes before you posted this. It works now.

0 Kudos
Reply