Hi,
Read data from Flash memory just like read a data from a dedicated address, please refer below code as an example:
//from flash address 0x1000, read 16 bytes back
destination = 0x1000; // flash address 0x1000
#define BUFFER_SIZE_BYTE 0x10
UINT32 programvalue[BUFFER_SIZE_BYTE];
for (i = 0; i<BUFFER_SIZE_BYTE; i=i+4)
{
programvalue[i] = *((UINT32 *)(destination+i)) ;
printf("\n programvalue[%d] = 0x%4x \n", i, programvalue[i]);
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------