Skip to content

Commit

Permalink
Remove redundant USB disable
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <[email protected]>
  • Loading branch information
SRGDamia1 committed Oct 22, 2024
1 parent 589bdcb commit 8a313c0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/WatchDogs/WatchDogSAMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ void extendedWatchDogSAMD::setupWatchDog(uint32_t resetTime_s) {
#endif
waitForWDTBitSync();

#if defined(__SAMD51__)
MS_DEEP_DBG(F("Making sure the the USB will be disabled on standby."));
USB->DEVICE.CTRLA.bit.ENABLE = 0; // Disable the USB peripheral for config
while (USB->DEVICE.SYNCBUSY.bit.ENABLE) {
// Wait for synchronization
}
USB->DEVICE.CTRLA.bit.RUNSTDBY = 0; // Deactivate run on standby
USB->DEVICE.CTRLA.bit.ENABLE = 1; // Re-enable the USB peripheral
while (USB->DEVICE.SYNCBUSY.bit.ENABLE) {
// Wait for synchronization
}
#endif
config32kOSC();
configureWDTClockSource();

Expand Down

0 comments on commit 8a313c0

Please sign in to comment.