power_ctrl.rst 342 B

12345678910111213
  1. Power control
  2. =============
  3. :meth:`pyb.wfi` is used to reduce power consumption while waiting for an
  4. event such as an interrupt. You would use it in the following situation::
  5. while True:
  6. do_some_processing()
  7. pyb.wfi()
  8. Control the frequency using :meth:`pyb.freq`::
  9. pyb.freq(30000000) # set CPU frequency to 30MHz