From a1584bb653d1c487a3238e8bbbd68a321a53c516 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 19 Jan 2020 12:05:34 +0000 Subject: [PATCH] nrf: nitrogen: Enable the WDT for this port Nitrogen *does* have a reset button... but it is good to have a platform to test with. --- ports/nrf/boards/nitrogen/mpconfigboard.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/nrf/boards/nitrogen/mpconfigboard.h b/ports/nrf/boards/nitrogen/mpconfigboard.h index 967cf2dab..62d27bff0 100644 --- a/ports/nrf/boards/nitrogen/mpconfigboard.h +++ b/ports/nrf/boards/nitrogen/mpconfigboard.h @@ -39,6 +39,7 @@ #define MICROPY_PY_MACHINE_TEMP (1) #define MICROPY_PY_RANDOM_HW_RNG (1) #define MICROPY_PY_MACHINE_DFU_BOOTLOADER (1) +#define MICROPY_PY_MACHINE_WDT (1) #define MICROPY_HW_HAS_LED (1) #define MICROPY_HW_LED_COUNT (2) @@ -47,6 +48,13 @@ #define MICROPY_HW_LED1 (28) // LED1 #define MICROPY_HW_LED2 (29) // LED2 +// WDT config +#define MICROPY_HW_HAS_WDT_BUTTON (1) +#define MICROPY_HW_WDT_BUTTON (27) +#define MICROPY_HW_WDT_BUTTON_ACTIVE (0) // active low +#define MICROPY_HW_WDT_BUTTON_PULL (1) // pull up +#define MICROPY_HW_WDT_BUTTON_ENABLE (0) // no enable pin + // UART config #define MICROPY_HW_UART1_RX (15) #define MICROPY_HW_UART1_TX (13)