Can I access internal flash memory using Embedded Coder?

I am working on a project where I use Embedded Coder to deploy to a microcontroller. 
I would like to store data in the microcontroller’s internal flash memory, so that the data is retained even after a power cycle.
I would like to know:
  1. Is this feasible?
  2. If so, how can I do it?

 채택된 답변

MathWorks Support Team
MathWorks Support Team 대략 16시간 전

0 개 추천

We do not support any block that directly allows users to write/read to/from the internal flash memory.
To do this, you must use the IO Device Builder app workflow to create your own system object, or the C-Caller block.
Attached is an example model and IOC with you based on the C-Caller implementation. You can use CubeIDE to verify that data is written to the last sector of the flash memory (0x080E0000). Please note that this is just a simple example to demonstrate the use of HAL APIs with C Caller and is not a full-fledged example; you may customize it accordingly.

추가 답변 (0개)

제품

릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by