FlexNVM on S32K144

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

FlexNVM on S32K144

1,811 Views
gramirezv
Contributor III

Hi,

I'd like to save data to NVM (preserve data after power cycling the S32K144EVB). I've trying to find related information for the MBD Toolbox, but I'm not sure if I'm looking in the right place.

Can I use the DataMemRead & DataMemWrite blocks?

Are there any support blocks for defining the FlexNVm partitions?

Any pointers on how to save data to memory on the S32K144 would be very much appreciated.

Best regards,

Gustavo

Tags (2)
2 Replies

1,443 Views
constantinrazva
NXP Employee
NXP Employee

Hello gramirezv‌,

Unfortunately we have no blocks available for writing to NVM. The only way you can do this is by adding custom code - you'll have to write by hand whatever you need. An alternative to this is using a System Start or System Outputs block (they come with standard Simulink blockset) In the System Start you can write all the code for initialization (executed once, at the beginning), while on System Outputs, you can write the code that is executed in the main loop.

As for the code itself, you can download S32 Design Studio for ARM (if you haven't already). There, once you apply the latest patch, you'll get the SDK for S32K1xx. This SDK comes with lots of examples, one named flash_partitioning_s32k144. You can check that out, along with the documentation they provide for the API. Unfortunately I haven't used the driver for FlexNVM up until now, so I can't be of more help.

Kind regards,
Razvan.

1,443 Views
gramirezv
Contributor III

Hi constantinrazvan.chivu‌, 

Thank you for your prompt reply as always. 

I'll check the flash partitioning example on the S32 Design Studio, I think that depending on what I get from the example I would decide what path to take. Either way I'm pretty sure I'll be back with more questions :smileygrin:

Best regards,

Gustavo

0 Kudos
Reply