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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,189 次查看
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 项奖励
回复
1 解答
1,167 次查看
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 项奖励
回复
3 回复数
1,168 次查看
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 项奖励
回复
1,159 次查看
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 项奖励
回复
1,141 次查看
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 项奖励
回复