Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 8, 2019

The SAMD51 core currently doesn't allow the microcontroller to sleep using the ARM WFI() function.

The reason is that SAMD51's USB peripheral is set to Run-On-Standby. Clearing the USB peripheral's RUNSTDBY bit allows the microcontroller to enter deep sleep on receiving the WFI() command.

The SAMD21 by contrast doesn't exhibit this behaviour and remains unaffected, irrespective of the RUNSTDBY bit state (0 or 1).

The suggested change is to the WatchdogSAMD::_initialize_wdt() function in the "WatchdogSAMD.cpp" file.

MartinL1 added 3 commits March 8, 2019 10:58
Disable the SAMD51 USB peripheral's Run-On-Standby (RUNSTDBY bit) to allow the microcontroller to enter deep sleep on __WFI().
Disable the SAMD51 USB peripheral's Run-On-Standby (RUNSTDBY) mode to allow the microntroller to enter deep sleep on WFI().
@ladyada ladyada merged commit 9731b94 into adafruit:master Mar 8, 2019
@ladyada
Copy link
Member

ladyada commented Mar 8, 2019

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant