Dependencies between S32K144 and S32K148

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

Dependencies between S32K144 and S32K148

5,838 Views
sabeelmohamedkh
Contributor I

In reference to evaluation board which contains S32K144 chip, please share if there is a need to make any additional changes to the software running on S32K144, in order to make it work for S32K148.

 

Currently there seems to be a issue of the very same software running on S32K144,not able to run on S32K148, as Hardfault exceptions are observed in S32K148, when SCG - VCCR registers are updated

0 Kudos
27 Replies

4,251 Views
sabeelmohamedkh
Contributor I

Hi

Can you please share on how to obtain the information of board version and CPU maskset

0 Kudos

4,251 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

On the back of your board should be some stickers: there you can get the board version. For example for S32K144 the board version is SCH-29248 rev B1

IMG_20171013_101641[1].jpg

CPU mask set should be on top of CPU after the name of the device.

Best regards,

Razvan

0 Kudos

4,251 Views
robertboys
Contributor IV

Hello

I have completed the hands-on lab for the S32K148 EVB and updated the lab for the S32K-144 EVB.

I think this thread has turned into one about S32DS but maybe my examples will be helpful.

Each lab has a Blinky and DSP example respectively for 144 and 148.

You can now have some reference programs that are working.

 

The S32K-148 EVB appnote is located here:

 www.keil.com/appnotes/docs/apnt_305.asp

 

The updated lab for the S32K-144 EVB is located here:

 www.keil.com/appnotes/docs/apnt_299.asp

Keil MDK is free for up to 32K code size.  All examples compile and run inside this limit.

It works with OpenSDA P&E or CMSIS-DAP modes or a selection of external debug adapters including any Keil ULINK or a J-Link.

 

Thanks

 

Bob Boys

San Jose, CA

0 Kudos

4,251 Views
sabeelmohamedkh
Contributor I

Hi 

Gentle reminder to please share on this issue, which is observed in example code of s32k, as shared in earlier message

0 Kudos

4,251 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

We still try to reproduce your issue, but until now we can't get the same behavior.

I loaded the same elf as in your project and it works fine.

Please provide the following details: board version and CPU maskset.

I tested on: SCH-29643 REV A board and P32k148uavlq qn20v qaa1709a CPU

Best regards,

Razvan

0 Kudos

4,251 Views
sabeelmohamedkh
Contributor I

Hi

Can you please share on how to obtain the information of board version and CPU maskset

thanks

0 Kudos

4,251 Views
raresvasile
NXP Employee
NXP Employee

Hi,

Can you please provide the value which you want to write in the RCCR register? 

I reckon that the clocks which are configured may trigger this issue by clocking the flash module with a value that is out of the supported range.

Thanks,

Rares

0 Kudos

4,251 Views
sabeelmohamedkh
Contributor I

Hi

Please see my above reply, where the issue is observed in hello world example project

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi Razvan, bob boys, daniel and all

We tried the S32K148 SDK on S32K148, if we use the "debug" option we faced again the hard faults, but, we dont observe the hard fault if we use "Debug_RAM" option.

The Linker files for both Debug and Debug_RAM are different, and use the following

1) debug - S32K148_256_flash.ld

2) debug_RAM - S32K148_256_ram.ld

Since "debug" build option was giving hard faults, In an exercise , if the debug_RAM linker file is manually replaced with "debug" linker file, Hard faults are not observed in "debug" option

Request to please share on the above issue, is there something missing in "debug" linker file/"debug" build option, due to which hard faults are observed in "debug" mode and NOT in "debug_RAM" mode of S32K studio

0 Kudos

4,255 Views
raresvasile
NXP Employee
NXP Employee

Hi,

Can you provide a stack trace of the application from when it hangs?

It would be useful to find out what causes the hard fault.

Thanks,

Rares

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi

Please find below the stack trace of the application.

As shared in the snippet below, when RCCR is updated, the hard fault is observed as disassembly code gets replaced/corrupted by undefined instructions. 

Probably(not sure) due to access to undefined instructions, hard faults is observed.

pastedImage_1.png

0 Kudos

4,255 Views
raresvasile
NXP Employee
NXP Employee

Hi,

This disassembly looks unusual. Can you try to run a SDK S32K148 example on the board(e.g. Hello world)? In this way we can check if the CPU or debugger connections are ok.

Thanks,

Rares 

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi 

Please find below the issue for SDK S32K148 example on the S32K148 board (e.g. Hello world)

I have also attached a VIDEO & Project showing the disassembly corruption.

Request to please share on the issue

pastedImage_1.png

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi

As mentioned earlier, The disassembly looks unusual because it  gets corrupted when RCCR is updated.

Just because RCCR update, the disassembly have valid instructions, as soon we execute the instruction base->RCCR =  status;, the disassembly gets corrupted.

As mentioned, due to above issue, undefined instruction is executed henceforth, and hard fault is observed.

Can you please share on the above.

0 Kudos

4,255 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

We can't reproduce this issue on our side. 

Please try to check if you observe the same issue on one of our example project or can you send us a project which has this issue? 

Best regards,

Razvan

0 Kudos

4,255 Views
shaileshagrahar
Contributor III

Hi All,

Could you please help me on this..

https://community.nxp.com/thread/460903 

Please help me .

Thanks!

0 Kudos

4,255 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi all,

The first post is related to Bob's post? The IDE used for this project is Keil?

sabeelmohamedkhaleelulla‌: "the same software" is too generic and I should clarify some aspects. The driver code is almost the same for all S32K14x devices and the clock manager is the same for all devices, so I suppose that your problem is caused by start-up file or by linker file. Do you use the linker and the startup for S32K148 provided in SDK?

Can you share your project for s32k148?

Best regards,

Razvan

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi Razvan

I dont have the S32K148 startup and linker files, as i didnt find them in the SDK.

Can you please share on the same.

Currently, since i dont have the above, I have taken a sample s32K144 startup code and linker for running on S32K148 chip.

sabeel

0 Kudos

4,255 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

The path to linker files is : <SDK_PATH>\platform\devices\S32K148\linker and after this you should select the linker file for your compiler and pinout.

The path to startup file is <SDK_PATH>\platform\devices\S32K148\startup and here you will find the start-up files for all supported compilers.

Best regards,

Razvan

0 Kudos

4,255 Views
sabeelmohamedkh
Contributor I

Hi 

Unfortunately i dont see "S23K148 folder" in the path "<SDK_PATH>\platform\devices"

I am not sure how to get the S32K148 SDK and S32K148 device header file, request to please guide on the same.

sabeel

0 Kudos