How to download nvm data to the MCU

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

How to download nvm data to the MCU

476 Views
JustVb
Contributor III

MCU: S32k144

I want to have a usage of combination of two Srec files. One is bootloader and the other is  application.

bootloader uses the data stored in the EEPROM(use FlexRAM  mapping to FlexNVM) the check if the application is valid.

Then I want combine the bootloader. EEPROM data and application into one standalone Srec file and use S32DS to  download the single srec file into the MCU.

Is there any solution?

0 Kudos
2 Replies

456 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is certainly possible. Following solution exists

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

But it does not use EEPROM decision, this feature you would have to add.

0 Kudos

447 Views
JustVb
Contributor III

hi , davidtosenovjan, thank you for your reply.

My problem is not how to use a bootloader to update/refresh the application.

But is how to use S32DS to download the EEPROM data which is used by the bootloader to check if the application is valid to the MCU.

My operation step is:

1.use S32DS to download the bootlaoder(boot.elf whose image  named boot.srec) to the MCU(region: 0x0~0x7FFF);

2.Running bootloader and use CAN bus to download the application(app.srec) to the MCU(region:0x8000~). When downloaded successfully, the bootloader would write some data which indicate the application is valid to the flexram->flexnvm. When start the MCU, the bootloader runs firstly, it will check if the application is valid by using the flexram data. Then the bootloader set the PC to the application start address to start the application

3.  I use debugger to attached to the running application and export the data in the range 0x10000000~ 0x1000FFFF and the range  0x14000000~0x14000FFF to a srecord file named eeprom.srec.

4.Then I use srec_cat to combine the three files(boot.srec, eeprom.srec, app.srec) to a single file combine.srec

tool url:https://srecord.sourceforge.net/man/man1/srec_cat.html

5.Then I want to use S32DS to download the combine.srec to the MCU but failed.

the situation is same as

https://community.nxp.com/t5/S32-SDK/S32K-FLEXRAM-EEPROM/td-p/1481545

0 Kudos