PIC32 two-speed startup
my PIC32MZ2048EFH144 has a display attached that it controls via LCC. Now it must learn to run on 3AA secondary cells, backlight dimmed.
I configured the "Clock" service to start from FRC 8MHz instead of POSC EC 8MHz + PLL 200MHz. So I can check the power supply situation in software and take appropriate measures.
In case mains is found, I can switch the resonator's supply voltage on through an output pin.
How do I then switch to POSC EC + PLL to have the PIC working as usual?