Skip to content
Open
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/RTCZero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ void RTCZero::detachInterrupt()

void RTCZero::standbyMode()
{
// Disable systick interrupt
SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
// Entering standby mode when connected
// via the native USB port causes issues.
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
__DSB();
__WFI();
// Enable systick interrupt
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
}

/*
Expand Down