-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Community: help wantedThe contributors require help from other members of the communityThe contributors require help from other members of the communityType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT
Description
Motivation
RIOT's PM system only considers MCU power levels. But boards may have external power domains as well, for example:
- A CAN transceiver may have an enable pin. Only with the enable pin at the "enable" level, the CAN transceiver will function.
- A board may use some MOSFETs to enable/disable the power supply to an external sensor. Using that sensor requires to enable that power domain.
- A board may use some MOSFETs to enable/disable the power supply to multiple external sensors at once. Using any of the sensors connected to the same power domain requires enabling that power domain.
The problem is that while it is trivial to implement some board_enable_power_domain_foo() / board_disable_power_domain_foo() for every power domain of the board, actually using this is non trivial:
- The board does not know when the hardware is used. It would have to enable the power domains in
board_init()and keep them enabled. - An application would know when e.g. it does an
saul_read()... and one could enable/disable the power domains there. However...- We ideally want applications to be (as much as possible) board agnostic and not know about board details
- We ideally want applications to not know about driver and hardware details. But power cycle the hardware without informing the driver of that hardware can cause issue (e.g. because configuration values are lost)
- The device driver would know exactly when it requires the hardware to be powered or not. But it (rightfully) has no knowledge about board details
Metadata
Metadata
Labels
Community: help wantedThe contributors require help from other members of the communityThe contributors require help from other members of the communityType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT