Using Flex NvM as Pflash in S32K144

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

Using Flex NvM as Pflash in S32K144

1,289 Views
Kamran
Contributor II

Hello All,

 

I am currently trying to place my bootloader code written for S32K144 in the FlexNvM area and use FlexNvM as P-flash.

Linker file snapshot below:

Kamran_0-1608796184115.png

When I try to flash my code using "GDB PEMicro interface debugging" I get errors when I start Debugging session

Question 1: Is it a correct approach to make complete 64KB of FlexNvM as D-flash to run code from it?

Question 2: What should be the partition value that needs to be filled in advance debug option?

Note: I also tried "Emergency Kinetics Device recovery by full chip erase" but it didn't help.

Edit1:

Screenshot below shows the advance options set (0x0F0C: Set complete flexNvM as Dflash)

Kamran_0-1608816063018.png

 

After I did this change, I am now getting the following error:

Kamran_1-1608816161557.png

The main function of my bootloader is placed at 0x10000730 location.

The interrupt table is is Pflash at 0x000000, so the controller is trying to jump from pflash to flexNvM.

 

Am I doing something wrong or am I missing something?

 

Please help!

@lukaszadrapa 

Tags (1)
0 Kudos
3 Replies

1,230 Views
Kamran
Contributor II

Hello Daniel,

Thanks for the support.

Now when I tried value 0x0F0C with PEmicro Debugger I get the following error:

Kamran_0-1609825972140.png

 

I even tried Emergency Kinetics recovery but still I get the same error.

Now I am not able to flash any code on the Pflash.

One weird thing that I noticed in that there is no data at address 0x00 also this address is shown as false for reading and writing.

Whereas my output file starts from 0x00 address, can this be an issue that is causing the flashing process to fail?

 

Kamran_1-1609826452720.png

@lukaszadrapa 

Best Regards,

Kamran Pathan

0 Kudos

1,211 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Kamran,

It seems like you configured the programmer to preserve the DFlash while you were loading the bootloader into the DFlash block.

This is the screenshot you sent.

danielmartynek_0-1610113790264.png

This option can be used later once the bootloader is already in DFlash and you want to preserve it.

Please try it without that.

 

Thank you,

Daniel

 

 

0 Kudos

1,251 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Kamran,

Please take a look at AN12218 S32K1xx Bootloader – Application note, it has the bootloader code in DFlash.

https://www.nxp.com/docs/en/application-note/AN12218.pdf

https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip

 

A1.

If the whole FlexNVM or just a part of it is used as DFlash, you can execute code from it.

A2.

I just tried the 0x0F0C value at it correctly partitioned the FlexNVM for 64MB of DFlash.

danielmartynek_0-1609759683584.png

danielmartynek_1-1609759718322.png

 

Regards,

Daniel

 

 

 

 

0 Kudos