I am wanting to slow down the speed of the PIC32 from 80MHz to 8MHz to save battery power but I want to let the RTOS know that it has changed so the 1ms tick timer is accurate so I can initiate a deep sleep state while in this light sleep state.
Is there a way of letting the RTOS know that it has changed or do we have to do it manually.
I am going to try the following.
- Suspend DMA.
- Suspend all interrupts.
- UNLOCK with system keys.
- Change the Internal FRC from 80Mhz to 8Mhz. (Possibly slow down the PB clock too).
- LOCK key.
- Update Timer 1 (PR1) with new value for 8MHz.
- Update any UART Baud rates for terminal output.
- Resume DMA.
- Enable all interrupts.
Does this sound reasonable?