diff options
-rw-r--r-- | watch-library/hardware/watch/watch_private.c | 5 | ||||
-rw-r--r-- | watch-library/shared/watch/watch.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/watch-library/hardware/watch/watch_private.c b/watch-library/hardware/watch/watch_private.c index cd607b8e..d6da4404 100644 --- a/watch-library/hardware/watch/watch_private.c +++ b/watch-library/hardware/watch/watch_private.c @@ -30,6 +30,11 @@ void _watch_init(void) { // disable the LED pin (it may have been enabled by the bootloader) watch_disable_digital_output(GPIO(GPIO_PORTA, 20)); + // disable debugger hot-plugging + gpio_set_pin_function(SWCLK, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(SWCLK, GPIO_DIRECTION_OFF); + gpio_set_pin_pull_mode(SWCLK, GPIO_PULL_OFF); + // RAM should be back-biased in STANDBY PM->STDBYCFG.bit.BBIASHS = 1; diff --git a/watch-library/shared/watch/watch.h b/watch-library/shared/watch/watch.h index 790f9a16..4ded68d5 100644 --- a/watch-library/shared/watch/watch.h +++ b/watch-library/shared/watch/watch.h @@ -30,6 +30,9 @@ #include "driver_init.h" #include "pins.h" +#define SWCLK GPIO(GPIO_PORTA, 30) +#define SWDIO GPIO(GPIO_PORTA, 31) + #ifdef __EMSCRIPTEN__ #include "watch_main_loop.h" #endif // __EMSCRIPTEN__ |