Hi Team,
There's an issue from the customer need your help:
I use the F021 api to erase and write the on-chip flash. The process is as follows:
Erase bank1 - write 0xaa to bank1 - read bank1 space and check whether all is written as 0xaa - erase bank1 - write 0x55 to bank1 - read bank1 space and check whether all is written as 0x55
In the above process, the first erasure, writing, and reading are all normal; the second erasure, writing is normal, and no error is reported, but when reading, it is found that a part of the space has not been written as 0x55, and is still 0xaa
The above problem does not occur for bank7
If I do not call CacheEnable during the startup phase, the above problem disappears;
If I call CacheEnable during the startup phase and call _dCacheInvalidate_ after each flash writing , I find through serial port printing that after the function calling _dCacheInvalidate_ is executed, it cannot continue to execute;
s
What may be the reason for this situation? How should I solve it?
In addition, what kind of permissions should I configure when configuring the space where flash bank0/1/7 is located in the mpu module?
Thanks & Regards,
Ben