mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
cpu/efm32/timer_series2: fix timer_start() interaction with pm_layered
The timer hasn't been enabled yet, if the STATUS isn't RUNNING, yet ...
This commit is contained in:
parent
41251507a2
commit
e6d18af3ad
@ -255,7 +255,7 @@ static inline void _letimer_start(tim_t dev)
|
|||||||
{
|
{
|
||||||
LETIMER_TypeDef *tim = timer_config[dev].dev;
|
LETIMER_TypeDef *tim = timer_config[dev].dev;
|
||||||
|
|
||||||
if (tim->STATUS & LETIMER_STATUS_RUNNING) {
|
if (!(tim->STATUS & LETIMER_STATUS_RUNNING)) {
|
||||||
pm_block(LETIMER_PM_BLOCKER);
|
pm_block(LETIMER_PM_BLOCKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ static inline void _timer_start(tim_t dev)
|
|||||||
{
|
{
|
||||||
TIMER_TypeDef *tim = timer_config[dev].dev;
|
TIMER_TypeDef *tim = timer_config[dev].dev;
|
||||||
|
|
||||||
if (tim->STATUS & TIMER_STATUS_RUNNING) {
|
if (!(tim->STATUS & TIMER_STATUS_RUNNING)) {
|
||||||
pm_block(TIMER_PM_BLOCKER);
|
pm_block(TIMER_PM_BLOCKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user