From 7d59a758dacae6e576b41daf4c98fbf673afcf00 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Mon, 9 Mar 2020 20:37:44 -0700 Subject: [PATCH] Make sure all pins are in reset state on teardown --- src/boards.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/boards.c b/src/boards.c index 3b03081..33ca2fe 100644 --- a/src/boards.c +++ b/src/boards.c @@ -115,6 +115,13 @@ void board_teardown(void) // Stop LF clock NRF_CLOCK->TASKS_LFCLKSTOP = 1UL; + + // make sure all pins are back in reset state + for (int i = 0; i < 32; ++i) + { + NRF_P0->PIN_CNF[i] = 2; + NRF_P1->PIN_CNF[i] = 2; + } } static uint32_t _systick_count = 0;