Hello,
I have been struggling most of today with an IACCVIOL (MemoryManagement Fault) and I'm running out of ideas. Google, while extremely helpful, hasn't turned up anything that caused an Ah-Ha moment and I'm hoping that someone here can help point me in the correct direction.
I am running ThreadX with numerous threads. Today, I added a new thread, and I'm am receiving the following fault:
Active faults
MemoryManage Fault (MMSR)
IACCVIOL (0) Instruction access violation flagFault Status Registers
IPSR 0x00000004 Exception Status Register (MemoryManage Fault)
CFSR 0x00000001 Configurable fault Status Register
MMSR 0x00000001 Memory Manage fault Status Register
BFSR 0x00000000 Bus fault Status Register
UFSR 0x00000000 User fault Status Register
HFSR 0x00000000 Hard fault Status Register
DFSR 0x00000000 Debug fault Status Register
MMAR 0x00000000 Memory Manage fault Address Register
BFAR 0x00000000 Bus fault Address Register
ABFSR 0x00000000 Auxiliary Bus Fault Status RegisterStacked Registers (MSP LR/EXC_RETURN=0xfffffff1)
R0 0x80004858
R1 0x800019A8
R2 0x8000485C
R3 0x00000000
R12 0x00000024
LR 0xBC0B537C
PC 0xBC0B537C
PSR 0x6000000E
MSP 0x81BFFF60
I understand that this is most likely due to the system trying to execute an instruction in a bad location. I *think* it is trying to point me to an assembly location of 0x81BFFF60 and I have the following command at that location:
ldr r0, [pc, #352] ; (0x81c000c4)
I have my memory map setup such that the main portion of my board uses the SDRAM (0x8000 0000 - 0x81BF FFFF) for the memory, but I also allocated 0x81C0 0000 - 0x81CF FFFF for one of my threads. This thread has been tested and debugged as working without issue for weeks... until today. (If it matters, this thread is specific to my Ethernet controller thread and is specifically allocated as a separate memory bank to preserve modularity and memory segregation.) I think the assembly command is correct and legit.
Today, I added a new thread that was to take care of the top-level state controller. However, as soon as I initialized the thread, I started crashing. Interestingly, during debugging, I discovered that the new thread works if I run it without the Ethernet controller and the Ethernet controller works without the new thread. (Obvious that I have some kind of interaction that I didn't intend.) I have double and triple checked that the memory pointers are correct, that the priorities are properly set, and that they are being instantiated as I expect. I have tried walking the code (crashes during the thread scheduler) and I seem to start executing the higher priority thread (state machine) before crashing; the Ethernet controller never hits the breakpoint.
Obviously, I am missing something and I can't seem to track it down. Any suggestions would be gratefully accepted.
Hi chadgraham,
Do you enable the cache? Please check the application note:
https://www.nxp.com/docs/en/application-note/AN12042.pdf
Please check chapter 5. Constraint Speculative Prefetch
Whether you consider the relation requirement, then modify it, any progress or not?
Best Regards,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------