2020-11-05 11:31 PM
Hi,
i am working on stm32wb55 nucleo board.
I want to read data form one location of internal flash e.g 0x08047000 and write into the other location e.g 0x08007000.
i found there is HAL_FLASH_Program API available to write data into internal flash but i can't found any API for read data from flash memory.
Can you please help to how can i read data from the internal flash?
please provide me if any example code is available.
Regards,
Arjun
Solved! Go to Solution.
2020-11-06 05:14 AM
Access like you would other memory, use a pointer..
uint32_t *p = (uint32_t *)0x08047000;
printf("%08X\n", *p);
2020-11-06 03:15 AM
Not sure I understand the blocking point with your question
Did you have a look at the BLE-RfWithFlash project
C:\STM32Cube_FW_WB_VX.Y.Z\STM32Cube_FW_WB_V1.9.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_RfWithFlash
To read some flash memory area, you should define a variable pointing on the physical address to want to access. You can define this variable with a size covering the size of the area you want to read.
Flash memory can be read like a SRAM memory. no need for specific functions.
2020-11-06 05:14 AM
Access like you would other memory, use a pointer..
uint32_t *p = (uint32_t *)0x08047000;
printf("%08X\n", *p);
2020-11-06 05:20 AM
Thanks Clive.
It is definitevely more explicit now!! :)
2020-11-06 05:27 AM
thank you so much it's work:thumbs_up:
2020-11-06 05:27 AM
thank you so much it's work:thumbs_up:
2024-01-05 04:47 AM
Can it work in byte access mode?