TI中文支持网
TI专业的中文技术问题搜集分享网站

关于触发MPU的flash写保护?

测试平台:TMS570LS1224

目前我已经设置了flash地址为0X000FFC00开始的1kb为只读权限,然后我尝试往这个地址去写数据(通过F021_API),实际却没有进入_dabort,但是直接取址操作赋值(*(volatile uint8 *)(0X000FFC00)) = 3;却会触发_dabort,这是为什么?

如下图:

Susan Yang:

请您参考一下

e2e.ti.com/…/471733

When the Flash API is used to program (write) to the flash, the CPU does not directly write to the Flash address. The physical write to the flash is performed by the Flash State Machine in the flash wrapper.

That the reason why the MPU cannot detect and block this write access.

In the flash configuration, there is way to protect sector or even bank to be erase or programmed.
If a sector or bank is accessed for program or erase, the flash API will return an error, and your application will have to take care of it.

赞(0)
未经允许不得转载:TI中文支持网 » 关于触发MPU的flash写保护?
分享到: 更多 (0)