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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,188件の閲覧回数
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,166件の閲覧回数
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,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 件の賞賛
返信
1,158件の閲覧回数
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,140件の閲覧回数
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 件の賞賛
返信