Skip to content

Commit

Permalink
cpu/efm32/timer_series2: fix timer_start() interaction with pm_layered
Browse files Browse the repository at this point in the history
The timer hasn't been enabled yet, if the STATUS isn't RUNNING, yet ...
  • Loading branch information
jue89 committed Oct 27, 2022
1 parent a0a2f50 commit 290f8b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu/efm32/periph/timer_series2.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static inline void _letimer_start(tim_t 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);
}

Expand All @@ -274,7 +274,7 @@ static inline void _timer_start(tim_t 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);
}

Expand Down

0 comments on commit 290f8b0

Please sign in to comment.