Power Efficient Software Coding

后端 未结 17 710
北海茫月
北海茫月 2020-12-23 16:19

In a typical handheld/portable embedded system device Battery life is a major concern in design of H/W, S/W and the features the device can support. From the Software progra

17条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 17:09

    Rather timely this, article on Hackaday today about measuring power consumption of various commands: Hackaday: the-effect-of-code-on-power-consumption

    Aside from that:
    - Interrupts are your friends
    - Polling / wait() aren't your friends
    - Do as little as possible
    - make your code as small/efficient as possible
    - Turn off as many modules, pins, peripherals as possible in the micro
    - Run as slowly as possible
    - If the micro has settings for pin drive strengh, slew rate, etc. check them & configure them, the defaults are often full power / max speed.
    - returning to the article above, go back and measure the power & see if you can drop it by altering things.

提交回复
热议问题