Hi,
In order to save power in my application I need to put the device into standby mode. Following the steps in Table 6-6 in the reference manual I set the clock source for the HF and LF clocks before entering standby. In order to resume the same state when exiting standby, I first use OSCClockSourceGet to save the current value and later call OSCClockSourceGet with those values. I'm doing this for both the high speed and low speed clocks, and both are coming back with OSC_RCOSC_HF. I was under the impression from Table 6-5 that it was not possible for the low-speed clock to use the RCOSC_HF source. My application was originally based on the simple peripheral example and has not made any modifications to default clock sources and I'm running bare metal at this point in the application.
The reason this has come to my attention is that when I call OSCClockSourceSet with my saved value after exiting standby, the device seems to go into some unknown state and stops being responsive until a hard reset is performed.
Please could you explain why I'm getting a seemingly invalid clock source before entering standby? And if setting the low-speed clock source to RCOSC_HF after exiting standby causes my device to crash, why doesn't it crash before that point?
Thanks,
Hester