Harmony and Power Saving Modes
I'm looking for information about using power saving modes with Harmony.
- sample code
- guide lines (do's and don't)
My Harmony project is running, it is just burning too much power. Basically the device sits idle, then wakes up to answer commands received by either UART, then sleeps again. System Timers are used to recover if noise causes any protocol glitches.
At the moment it has:
a) 3 Apps, running in the normal Harmony sequence are per the Harmony Generated Code (i.e. full no sleeps or anything else, as fast as possible).
b) 2 UART running as Static with Rx Interrupts
- MCU should wake up upon receive
- Data rate: 230kbps=23Kcps, in normal operation a set of packets would be received about every two seconds.
- FIFOs enabled so some slow code response is OK, and I have my own Ring Buffers on both Tx and Rx.
- Tx is put to FIFOs in polled mode, no interrupts. Bonus if can sleep while waiting for Tx FIFO space.
c) System Service Timers:
- These should continue and wake MCU upon a timeout.
- Using callbacks in both single and periodic mode
- SYS_TMR_CallbackPeriodic(uPeriodMS, TmrA, vSysTmrCallback);
- SYS_TMR_CallbackSingle(uPeriodMS, TmrB, vSysTmrCallback);
d) In use but don't need to run during low power:
- Will be adding OC/PWM (but none of those need to run.
Ideas, Suggestions, sample code - all appreciated.