[riot-commits] [RIOT-OS/RIOT] 5d123c: cpu/sam0_common: distribute PM_NUM_MODES among sib...

Dylan Laduranty noreply at github.com
Thu Apr 2 17:14:43 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 5d123cbb22f0539271e6886b324d853a942fc97b
      https://github.com/RIOT-OS/RIOT/commit/5d123cbb22f0539271e6886b324d853a942fc97b
  Author: Benjamin Valentin <benjamin.valentin at ml-pa.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M cpu/sam0_common/include/periph_cpu_common.h
    M cpu/samd21/include/periph_cpu.h
    M cpu/samd5x/include/periph_cpu.h
    M cpu/saml1x/include/periph_cpu.h
    M cpu/saml21/include/periph_cpu.h

  Log Message:
  -----------
  cpu/sam0_common: distribute PM_NUM_MODES among siblings

Also adapt the defines to the documentation

 - CPUs define up to 4 power modes (from zero, the lowest power mode,
   to PM_NUM_MODES-1, the highest)
 - >> there is an implicit extra idle mode (which has the number PM_NUM_MODES) <<

Previously on saml21 this would always generate pm_set(3) which is an illegal state.
Now pm_layered will correctly generate pm_set(2) for IDLE modes.

Idle power consumption dropped from 750µA to 368µA and wake-up from standby is also
possible. (Before it would just enter STANDBY again as the mode register was never
written with the illegal value.)


  Commit: 7e156dd2e510acf4f98dedfb4692ee58d427b813
      https://github.com/RIOT-OS/RIOT/commit/7e156dd2e510acf4f98dedfb4692ee58d427b813
  Author: Benjamin Valentin <benjamin.valentin at ml-pa.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M cpu/saml1x/periph/pm.c
    M cpu/saml21/periph/pm.c

  Log Message:
  -----------
  cpu/saml1x, saml2x: PM_NUM_MODES is a valid mode

The mode PM_NUM_MODES is the IDLE mode, so do not skip it.


  Commit: 4eb9b9b9df151b3993f160a62d6770c241fb1b9f
      https://github.com/RIOT-OS/RIOT/commit/4eb9b9b9df151b3993f160a62d6770c241fb1b9f
  Author: Dylan Laduranty <dylan.laduranty at mesotic.com>
  Date:   2020-04-02 (Thu, 02 Apr 2020)

  Changed paths:
    M cpu/sam0_common/include/periph_cpu_common.h
    M cpu/samd21/include/periph_cpu.h
    M cpu/samd5x/include/periph_cpu.h
    M cpu/saml1x/include/periph_cpu.h
    M cpu/saml1x/periph/pm.c
    M cpu/saml21/include/periph_cpu.h
    M cpu/saml21/periph/pm.c

  Log Message:
  -----------
  Merge pull request #13751 from benpicco/sam0-pm

cpu/sam0_common: fix handling of PM_NUM_MODES


Compare: https://github.com/RIOT-OS/RIOT/compare/192c8515b124...4eb9b9b9df15


More information about the commits mailing list