Hi,
I would like to read out the Program Flash.
The erase and write operations are OK!
in attach the example with KSD-3.0 and SDK 1.3
Any suggestions, thank.
B.R.
Loris
Original Attachment has been moved to: prjFrdmkl27z_deb_ledRGB_tim1_tpm_flash.zip
Solved! Go to Solution.
Hi Loris,
Are you only trying to access the Flash program space?
If yes, then you can do one of the following as you do not need any special flash read function call:
#define READ8(address) | ((uint8_t)(*(vuint8_t*)(address))) |
#define READ16(address) | ((uint16_t)(*(vuint16_t*)(address))) |
#define READ32(address) | ((uint32_t)(*(vuint32_t*)(address))) |
for example, you can use the following code to access flash no matter whether the flash save data or code.
uint16_t value, i, *pSrc, *pDest; |
pSrc=0xxxxxxxx;
value=READ16(pSrc);
pSrc++;
OR
unsigned int *read_flash; | |
volatile unsigned int temp; | |
read_flash = *((unsigned int *)0x0003FFE0); | |
temp = ((unsigned int *)read_flash); |
Regards,
David
Thank so much.
B.R.
Loris
Hi Loris,
Are you only trying to access the Flash program space?
If yes, then you can do one of the following as you do not need any special flash read function call:
#define READ8(address) | ((uint8_t)(*(vuint8_t*)(address))) |
#define READ16(address) | ((uint16_t)(*(vuint16_t*)(address))) |
#define READ32(address) | ((uint32_t)(*(vuint32_t*)(address))) |
for example, you can use the following code to access flash no matter whether the flash save data or code.
uint16_t value, i, *pSrc, *pDest; |
pSrc=0xxxxxxxx;
value=READ16(pSrc);
pSrc++;
OR
unsigned int *read_flash; | |
volatile unsigned int temp; | |
read_flash = *((unsigned int *)0x0003FFE0); | |
temp = ((unsigned int *)read_flash); |
Regards,
David