2024-08-13 11:41 PM
Hello
After running the code for about one to two hours I always get Hard Fault exception. Readout of the registers in this Hard Fault while loop are:
HFSR=0x4000 0000
CFSR=0x8200
BFAR=0x20020000
MMFAR=0x20020000
AFSR=0
Readout of the SP register shows:
SP=0x2001ff40
*(SP)=8
*(SP-1)=8
*(SP-2)=1
*(SP-3)=2
*(SP-4)=2
*(SP-5)=2
*(SP-6)=0
*(SP-7)=0
*(SP-8)=0x2001ffc0
*(SP-9)=0x8012ae8
What is going on here? How to make a proper recovery from this situation?
Solved! Go to Solution.
2024-10-02 08:13 AM
Are you sure it was EMI? excessive switching noise on the SMPS output could also cause glitches for example.
2024-10-02 10:18 AM
I assume that is EMI because the power supply in question had no direct connection with the micro-controller except for the ground. Micro-controller is supplied from another SMPS which works fine with the component for more than a decade.
I did not measure with the spectrum analyzer because of lack of time. Maybe I will do that at some point in the future.
2024-10-02 12:09 PM
Fair. Would have been interesting to verify by shielding with an improvised can and seeing if the issue went away.