Dear Mrs. Liu,
The microcontroller in question is being used on a board designed for IoT applications related to smart vending systems.
Over the past few days, I have identified that the root cause of the previously reported issue appears to be related to the configuration of the HGO bit in the MCG_C2 register. Specifically, in the clock_change() function, I initially set the HGO bit to 1 (High-Gain Oscillator mode). However, when I change this setting to 0 (Low-Power mode), the issue no longer occurs.
At this point, I am unable to determine a clear technical explanation for this behavior.
For reference, the oscillator feedback resistor is 1 MΩ, and I have observed the following signals:
1. HGO = 1: Oscillator signal is a 12 MHz periodic waveform with a 3 V peak.
2. HGO = 1: OSCERCLK output is a constant 3.3 V (DC level).
3. HGO = 0: Oscillator signal is a 12 MHz periodic waveform with a 1.2 V peak.
4. HGO = 0: OSCERCLK output is a 12 MHz square wave.
Could you please help me understand this behavior? In particular, are there more specific electrical or performance requirements (not indicated in the datasheet) that the external oscillator must meet in order to operate reliably in High-Gain mode?
Thank you in advance for your support. Looking forward to hearing from you soon.
Kind regards,
Vladimir Zitoli