We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Can you read back I-cache content when it hits the undefined exception?When you read the instruction pointed by LR through the debugger, it would be re-loaded from the external memory then you should see the different instruction than the one I-cache line.Regards,Charlie
How do you find out what the I-cache content is? Doing an LDR rn, [lr, -4] in the undef handler is going to read the data cache not the instruction cache.If the instruction fetch sometimes returns bad data then you might see symptoms like this -- but I'd expect more problems than just undef instructions at one location.Is the code that is undeffing being loaded/modified?
Hi YS1234,For checking external memory, I'd like to suggest relocation of your code to different address of external memory.One more thing for checking internal path or cache line fill, you could add one or two 'NOP' prior to the problematic instruction and see what's different.Thanks,Charlie
Actually I have seen two cases, one case is I-cache content is OK, the "undefined instruction handler" can simply set the PC to the lr-4, and the code continue running OK. Another case is I-cache content is wrong, [...]