How to save data in the on-board flash(MBD & MPC5744p)?

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

How to save data in the on-board flash(MBD & MPC5744p)?

Jump to solution
959 Views
Zhangfeng1
Contributor I

Hello everyone!

I have a devkit-mpc5744p.I would like to use Freemaster to edit a variable and save it,it's successfully done.But if i restart the board,the value of this variable becomes the initial value of the Simulink block(data store memory).

Is there any way to save a variable to another address after I edit it, and read the value of that address first when I restart the circuit board?Or there are other ways to achieve this goal, such as adding an external flash module?

Thank you for your attention.

0 Kudos
1 Solution
937 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Zhangfeng1,

As you describe here, you require to have an EEPROM. the MPC5744P can "emulate" the EEPROM functionality but unfortunately, for now, we do not provide such block on the MPC5744P, only for the S32K.

However, the generated code is based on the S32SDK for Power and you can simply take the C code from the example and insert it as a custom code in the MPC5744P model following the procedure described here https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

Hope this helps,

Marius

View solution in original post

0 Kudos
3 Replies
938 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Zhangfeng1,

As you describe here, you require to have an EEPROM. the MPC5744P can "emulate" the EEPROM functionality but unfortunately, for now, we do not provide such block on the MPC5744P, only for the S32K.

However, the generated code is based on the S32SDK for Power and you can simply take the C code from the example and insert it as a custom code in the MPC5744P model following the procedure described here https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

Hope this helps,

Marius

0 Kudos
929 Views
Zhangfeng1
Contributor I

Hello,Marius.

Thank you for your answer,I'll try this solution.By the way,Is it possible to add this block in the future?I think that would be very useful.

0 Kudos
911 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Zhangfeng1 ,

I will open an internal ticket for that but I cannot promise you when or if this feature will be added.

Regards,

Marius

0 Kudos