cc2538: pwm: Automatically disable PM1+ if running

The peripheral core clocks of the PWM timers are gated in PM1+, so these
power modes must be disabled if a PWM timer is running. Use
lpm_register_peripheral() to handle this automatically and dynamically.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
Benoît Thébaudeau 2015-12-13 02:33:31 +01:00
parent 9c6d9a7fe0
commit 4a6e19ed38
4 changed files with 20 additions and 7 deletions

View file

@ -47,8 +47,7 @@
* Depending on the specific needs these limits can be changed to meet a given
* duty cycle and lower frequencies by using the prescaler (GPTIMER_TnPR).
*
* The PWM timer is stopped when dropping below PM0, alternatively you can set
* LPM_CONF_MAX_PM to zero, or call lpm_max_pm(0)
* Running a PWM timer prevents the LPM driver from dropping to PM1+.
*
* @{
*