Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/efm32/pm: fix blocking EM1 #18775

Merged
merged 2 commits into from
Oct 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cpu/efm32/pm: add debug output
  • Loading branch information
jue89 committed Oct 19, 2022
commit 67b380034a7b1ac2883576c22dda1b58ef276109
6 changes: 6 additions & 0 deletions cpu/efm32/periph/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,24 @@

#include "em_emu.h"

#define ENABLE_DEBUG 0
#include "debug.h"

void pm_set(unsigned mode)
{
switch (mode) {
case EFM32_PM_MODE_EM3:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM3");
/* after exiting EM3, clocks are restored */
EMU_EnterEM3(true);
break;
case EFM32_PM_MODE_EM2:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM2");
/* after exiting EM2, clocks are restored */
EMU_EnterEM2(true);
break;
case EFM32_PM_MODE_EM1:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM1");
/* wait for next event or interrupt */
EMU_EnterEM1();
break;
Expand Down