• AVR Freaks

AnsweredHarmony and Power Saving Modes

Author
Paul PortSol
Super Member
  • Total Posts : 430
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
2015/12/22 09:55:34 (permalink)
0

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)
- anything
 
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:
     - ADC
     - Will be adding OC/PWM (but none of those need to run.
 
Ideas, Suggestions, sample code - all appreciated.
 
#1
NKurzman
A Guy on the Net
  • Total Posts : 17249
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Harmony and Power Saving Modes 2015/12/22 13:05:28 (permalink)
3 (1)
"it is just burning too much power".  is that an MKS unit?
How much?
You can cut the clock rate if it can handle the MIPS loss.
 
Available Power saving modes are in the data sheet. 
#2
Totem
Super Member
  • Total Posts : 266
  • Reward points : 0
  • Joined: 2014/12/04 02:18:11
  • Location: Mars
  • Status: offline
Re: Harmony and Power Saving Modes 2015/12/22 20:31:37 (permalink) ☼ Best Answerby Paul PortSol 2016/01/05 10:25:12
3 (1)
Refer to "Peripheral Libraries Help > Power Peripheral Library" of Harmony help document.
 
 
#3
Paul PortSol
Super Member
  • Total Posts : 430
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Harmony and Power Saving Modes 2016/01/05 10:25:21 (permalink)
3 (1)
Thank you, I had missed that section. 
#4
Jump to:
© 2019 APG vNext Commercial Version 4.5