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.
Hi,
I am facing a scenario where enabling FIQ causes a prefetch abort only during a power on reset.
I am disconnecting the target after flashing the software and then i am doing a power on reset, the system didnt run as expected to debug the issue i connected back to the target and found that the system is stuck in prefetch handler.
Instruction fault status register = 0x00000008
Instruction fault Address register = 0x3E5BB2B0
The SPSR_ABT indicates that the system was in FIQ mode. Only ESM interrupts are FIQ and all other interrupts are configured as IRQ
The system is running as expected in debug mode but not after a power on reset and I am not facing this problem if FIQ isnt enabled
As a work around to this problem I am doing a S/W reset in prefetch abort handler and after the S/W reset the system runs as expected, but I really dont understand the root cause behind this. It would be really great if i could some help in resolving this issue.
Thanks.
found that the system is stuck in prefetch handler.
Possible reason for prefetch abort may be:
ECC Error on the instruction read: The IFAR register provides the address that caused the error to be detected. The auxiliary IFSR indicates source of the ECC error.
The ECC values for all of the Flash memory space must be programmed into the Flash before the program/data can be read. This can be done by generating the correct values of the ECC with Linker CMD file. The Cortex R5F CPU may generate speculative fetches to any location within the Flash memory space. A speculative fetch to a location with invalid ECC may create an abort.
The system is running as expected in debug mode but not after a power on reset and I am not facing this problem if FIQ isnt enabled
What is the value of ESM status register 2 and ESM Status Shadow Register 2? If FIQ is enabled, any error in ESM group 2 will trigger ESM HIGH interrupt (FIQ)?
How to generate ECC using Linker CMD file:
https://software-dl.ti.com/hercules/hercules_docs/latest/hercules/How_to_Guides/index.html
Hi Wang,
Thanks for your reply.
I did as per your suggestion ( ECC generation using linker file) but unfortunately that didn't resolve my issue, the behavior is same for linker generated ECC and CCS generated ECC.
Auxiliary IFSR value is 0x00
I am attaching the snapshot of CP15 register set
Linker file
QJ : What is the value of ESM status register 2 and ESM Status Shadow Register 2? If FIQ is enabled, any error in ESM group 2 will trigger ESM HIGH interrupt (FIQ)? - No fault is set by ESM when system is running in debug mode.
If this fault is related to Flash ECC then a software reset on prefetch handler shouldn't be masking this issue right ?
To enable the ECC generation through Linker CMD file, the linker option should be enabled,
and uncheck the "Auto ECC Generation"
Hi Wang,
Thanks for your reply!
Yes I did enable those options.
Initially i was calling checkRAMUERRTest() right before running ECC test on SRAM
I am not facing prefetch issue on POR if I run the test after __TI_auto_init() function and not before CheckRAMECC
Are there any preconditions for running SRAM address decode test ? Why the issue is seen if the test is ran before CheckRAMECC ?
Are there any preconditions for running SRAM address decode test ?
No. There is no precondition for running this test.
Why the issue is seen if the test is ran before CheckRAMECC ?
The checkRAMUERRTest() is to test the redundant address decode and compare logic. The checkRAMECC() is to test the CPU ECC mechanism for RAM accesses. It should be fine to run checkRAMUERRTest() before or after checkRAMECC() test.
I am not sure why you got prefetch exception when running checkRAMUERRTest() before checkRAMECC().
Please disable the interrupt before running those selftest.