How to store data into Flash?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I want to store some data into xmc4500's flash . It's memtion that "flash--64 KB on-chip high speed data memory" in xmc4500 reference manual.

Does anybody provide any demo or example to preform write data into flash and read data from flash?
0 Likes
6 Replies
Not applicable
Hi,

Flash driver is provided in DAVE3 as FLASH002 App.
The app provides the APIs for different flash operation.
0 Likes
Not applicable
🙂 thanks, i will test it .
0 Likes
Not applicable
Jackson wrote:
Hi,

Flash driver is provided in DAVE3 as FLASH002 App.
The app provides the APIs for different flash operation.


I had read the help of FLASH002 App, It's not provide the API for read data from flash/memory. By the way,how to write an 16bit data into flash where is not used for code?
0 Likes
Not applicable
xmc4500 wrote:
I had read the help of FLASH002 App, It's not provide the API for read data from flash/memory.


You can read from the memory directly using pointer to the memory address.

xmc4500 wrote:
By the way,how to write an 16bit data into flash where is not used for code?

No, it is not possible. The minimum size to write to flash is a page size which is 256bytes


And for your information, to erase the flash, you have to erase by sector (16Kbytes - 256kBytes depending on which sector you are erasing).
0 Likes
Not applicable
Hi ,Jackson .
Could you provide an examle or demo to perform the funtion via FLASH002 App?:)

Best Regards.
0 Likes
Not applicable
Hi,

Example code is provided in the app documentation.
Go to Help > Help Contents > DAVE Apps > FLASH002 > API Documentation
0 Likes