Closed jeromeDms closed 2 years ago
Hi, Please enable LDROM update macro as below in your code:
FMC_ENABLE_LD_UPDATE();
// erase second page in LDRom
FMC_Erase(LDROM_PRODUCT_ID_ADDRESS);
FMC_Write(LDROM_PRODUCT_ID_ADDRESS, SYSX_HEADER_BYTE5);
FMC_DISABLE_LD_UPDATE();
Ahhh great. Will test. Is this macro only required to write operations or read operations as well ? Also, the FMC_Open / Close are still required too ? Is the SYS_UnlockReg() also required ?
Macro is required for erase and write operation. It doesn't need to enable for read operation.
If you want use FMC function, the FMC_Open is required. SYS_UnlockReg() is used to avoid writing some register by accident. For example, some register of FMC, clock and ... If it is not called, it may cause some register unable to update.
Please check the BSP sample for the usage for detail.
Hi I'm trying to read/write LDROM from my app code in APROM as follow :
Unfortunately FMC_Read() always return 0x0000. The chip setting is set with APROM+IAP. I'm using FMC_Open() before the read().
The weird thing is the read returns 0x0000 and looking memory in Keil at LDROM address 0x00100000 I can only see 0xFFFF.
Any idea ? Thanks