Hi.
I am wondering a way to read a part of flash memory on K64.
I have already tried using FLASH_ReadOnce and FLASH_ReadResource, but to no avail.
All help is welcome, thank you.
Solved! Go to Solution.
Hi
Try
unsigned char buffer[16];
(const void *)flash_add = 0x4000;
memcpy(buffer, flash_add, 16);
// Now we have the 16 bytes form flash address 0x4000 in buffer
Or generally
unsigned char flash_data = *(unsigned char *)0x4000;
To read any byte from flash.
Only the program once area requires special operation to read. The rest is simply memory-mapped.
Regards
Mark
Hi
Try
unsigned char buffer[16];
(const void *)flash_add = 0x4000;
memcpy(buffer, flash_add, 16);
// Now we have the 16 bytes form flash address 0x4000 in buffer
Or generally
unsigned char flash_data = *(unsigned char *)0x4000;
To read any byte from flash.
Only the program once area requires special operation to read. The rest is simply memory-mapped.
Regards
Mark
Now I need to delete, write and read a memory location. Can you help me?
Hi
Erasing and writing requires Flash routines.
See http://www.utasker.com/kinetis/FRDM-K64F.html (with command line interface capabilty to read/write/erase internal Flash) and simulation.
Code available at http://www.utasker.com/kinetis.html
Including various file and parameter system that can operate in internal flash or external SPI flash.
Operation and low level interface described in http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF
Regards
Mark
Hi Mark I am very grateful for your help, thank you!