Dear NXP Support Team.
There are a few questions I would like to ask about flash:
1. Whether it is necessary to initialize when using on-chip Flash of MPC5643L?
2. The programme flow provided in the chip manual, but it will not be able to write.
3.I followed the erase procedure in the chip's manual, and it doesn't erase it either.
4.Please help to Provide a flash driver demo project that can be programmed/erased properly?
5. Part of the sample code is as follows:
I suppose you mean runtime programming. It is easiest to use SSD driver, I would recommend to use. On the product webpage you may find in section ‘Software’ and file is called ‘MPC56xx C90FL JDP Standard Software Driver for Single-Module Flash’
Also I could point out following example showing simple programming without using of SSD drivers: