Skip to content

Commit

Permalink
efm32hg-blinky-usb: disable watchdog
Browse files Browse the repository at this point in the history
This gains us compatibility with the new bootloader.

Signed-off-by: Sean Cross <sean@xobs.io>
  • Loading branch information
xobs committed Jan 21, 2018
1 parent 92e5c0f commit 2c2f21a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions efm32hg-blinky-usb/main.c
Expand Up @@ -9,6 +9,7 @@
#include "em_emu.h"
#include "em_gpio.h"
#include "em_usb.h"
#include "em_wdog.h"

#include "callbacks.h"
#include "descriptors.h"
Expand Down Expand Up @@ -38,6 +39,9 @@ int main() {
// errata (implements workarounds, etc).
CHIP_Init();

// Disable the watchdog that the bootloader started.
WDOG->CTRL = 0;

// Switch on the clock for GPIO. Even though there's no immediately obvious
// timing stuff going on beyond the SysTick below, it still needs to be
// enabled for the GPIO to work.
Expand Down

0 comments on commit 2c2f21a

Please sign in to comment.