This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: 片内flash擦写问题

Part Number: TMS570LC4357

我使用F021 api对片内flash进行擦写,流程如下:

擦除bank1——向bank1写入0xaa——读取bank1空间检验是否全部写为0xaa——擦除bank1——向bank1写入0x55——读取bank1空间检验是否全部写为0x55

在上面流程中,第一次擦除、写入、读取都正常;第二次擦除,写入正常,无报错,但读取时候发现有一部分空间未被写为0x55,仍然是0xaa

对于bank7未出现上面问题

若我在启动阶段不调用CacheEnable,上述问题消失;

若我在启动阶段调用CacheEnable,在每次写完flash后调用_dCacheInvalidate_,通过串口打印发现在调用_dCacheInvalidate_的函数执行完之后无法继续执行;

请问这种情况可能是什么原因?我应该如何解决?

另外,我在mpu模块中配置flash bank0/1/7所在空间时应该配置为哪种权限?