7-4 Program to Change the Clock Frequency

This is the program to change the clock frequency.
These functions (idiv3() and idiv1()) are programs to change the divider setup.
It just writes the setting value to the frequency control register.

These functions (pll4() and pll3()) are examples of changing the PLL multiplier.
Set the oscillation stabilization time in WDT and overwrite the frequency control register.
WDT counter operates using the peripheral clock after the change.
WDT stops automatically after standby is cancelled.