HELLO EXPERT:
Is there any example of how to make a flash driver for the S32K3 chip? Currently, our practice is to allocate a piece of RAM to store the flash driver, and when it needs to be erased or written, use a function pointer to point to this RAM address to execute it. However, these modifications are implemented in C40IP.C, and when the code is regenerated, all the modifications will not be retained. In fact, the so-called flash driver in my opinion is C40_Ip_pFlashBaseAddress->MCR |= FLASH_MCR_EHV_MASK;
Hi@PINKMAN
I have described it in detail in the comments of this document.
https://community.nxp.com/t5/S32K-Knowledge-Base/Unified-bootloader-Demo/ta-p/1423099
Also, more detail regarding making flash driver for S32K1, which is simiar to all MCU.
https://community.nxp.com/t5/S32K-Knowledge-Base/S32K-How-to-make-Flash-Driver-image/ta-p/1630873
Please note that we have limtied support for this, this is just for reference only.
I carefully studied the demo you provided, and I realized that you didn't use the FEE and MemAcc modules, you used the C40IP directly.
in fact, we need to use the EEPROM for our boot.
My question is, before the flash driver is downloaded into RAM, if the DFLASH has overflowed and SWAP is needed, how should I deal with this situation when I need to erase the DFLASH, but there is no driver?
Hi@PINKMAN
My question is, before the flash driver is downloaded into RAM, if the DFLASH has overflowed and SWAP is needed, how should I deal with this situation when I need to erase the DFLASH, but there is no driver?
If all operations in your program depend on the flash driver, but your flash driver is not stored in RAM, it will certainly not be able to perform any flash operations.
This problem itself is problematic.