Skip to content

Commit 7d59a75

Browse files
committed
Make sure all pins are in reset state on teardown
1 parent e2e220a commit 7d59a75

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/boards.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ void board_teardown(void)
115115

116116
// Stop LF clock
117117
NRF_CLOCK->TASKS_LFCLKSTOP = 1UL;
118+
119+
// make sure all pins are back in reset state
120+
for (int i = 0; i < 32; ++i)
121+
{
122+
NRF_P0->PIN_CNF[i] = 2;
123+
NRF_P1->PIN_CNF[i] = 2;
124+
}
118125
}
119126

120127
static uint32_t _systick_count = 0;

0 commit comments

Comments
 (0)