Tool/software:
Hi experts,
- I'm trying to simulate a faulty crystal oscillator by shorting the two terminals of the crystal. When I do this, an NMI interrupt occurs, and the NMI_Handler() is executed. At that point, the status registers are as follows: NMIRIS=8, NMIIIDX=4, and CLKSTATUS=0x00807440. And I have 2 big questions:
1) After exiting the interrupt, I let the MCU continue running. However, when I short the crystal terminals again, the MCU doesn't jump to the NMI_Handler() anymore. Why is that?? (because I want to do if this error occurs three times, the MCU performs BOOTRST and uses the LFOSC instead of the LFXT)
2) Is there a way to check when the LFXT has recovered and is working correctly again? Or to determine if the operating frequency of the LFXT is incorrect??
Best regards,
Son

