我在使用 Cortex-R过程中,在进行FLASH操作时发生data abort,状态码指示Synchronous External Abort。想请问这个是的错误源通常是什么?
你好,我又测试了一下,发现我只进行了初始化以后,就已经产生了BTCM ECC error。其中,设置情况为MPU为禁止,BTCM RAM ECC使能,ATCM FLASH ECC禁止。尝试过增大STACKS,但是没有效果。
synchronous external abort是在初始化后操作FLASH才产生的。
初始化程序运行过程中可能伴有中断产生。这会导致此问题吗?synchronous external abort会不会与BTCM ECC error有关呢?
谢谢
查下你的芯片手册和处理器手册吧,看有没有建议的操作。感觉软件问题比较多啊,估计得用单步操作之类的一步一步调试了。先查查TCM ECC error的问题吧,查一下是那个类型的error。可参考Handling TCM ECC errors,
When a fatal error, that is, a 2-bit ECC error, is detected on a TCM read, an error is generated. Instruction and data reads generate the appropriate type of precise abort, and the AXI-slave interface returns a SLVERR response to the AXI system.
When a correctable error, that is, a 1-bit ECC error, is detected on a TCM read made by the AXI-slave interface, the processor corrects the data inline before returning to the system.
如果你软件的BTCM ECC error和sync external abort有关系的话,为何等到初始化后操作FLASH的时候才产生这个abort,如果有关应该同时产生吧。另外,你操作FLASH的时候,MPU还是禁止的么?
刚才注意到这个寄存器,你结合DFAR查下软件的2次出错error/abort的具体状态吧,
Table 4-30 ADFSR and AIFSR bit functions
Bits Field Function
[31:28] Reserved SBZ.
[27:24] CacheWaya The value returned in this field indicates the cache way or ways in which the error occurred.
[23:22] Side The value returned in this field indicates the source of the error. Possible values are:
b00 = Cache or AXI-master interface
b01 = ATCM
b10 = BTCM
b11 = Reserved.
[21] Recoverable error
The value returned in this field indicates if the error is recoverable.
0 = Unrecoverable error.
1 = Recoverable error. This includes all correctable parity/ECC errors and recoverable TCM external errors.
[20:14] Reserved SBZ.
[13:5] Indexb
This field returns the index value for the access giving the error.
[4:0] Reserved SBZ.