I wrote the MAC address in flash using flashiap.
Below was made based on a sample of NXP.
MAC address was included in page_buf, and copied this in a flash.
But I don't understand the way to read this data from a flash.
Please tell me the way to read data of a flash using flashiap.
/* Program sector */
for (i = 0; i < (FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES / FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES); i++)
{
FLASHIAP_PrepareSectorForWrite(7, 7);
FLASHIAP_CopyRamToFlash(
//FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES + (i * FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES), &page_buf[0],
0x38000 + (i * FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES), &page_buf[0],
FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES, SystemCoreClock);
}
I can read data by below(flashdata).
const unsigned char flashdata= *(unsigned char *)0x038000;
I use LPC54608J512 and this device have 512K flash(0 to 15 sectors).
But I can not access 8 to 15 sectors.
Please teach me how to access 8 to 15 sectors.
Hi Customer,
Yes, if you want to read the flash data, just read that address's data is OK.
You said, you can't access 8 to 15 sectors, please check, do you control the correct address?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------