From 3d303b7930f13142bcfec5ec33c74e40d0e484cf Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sun, 23 Apr 2023 15:06:17 +0200 Subject: [PATCH] Disable UART before resetting The UART causes in 1.25mA current consumption in sleep mode when left enabled. That's a massive power drain! While the application could disable the UART, it seems better to fix this directly in the bootloader. --- src/boards.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/boards.c b/src/boards.c index 7cd00141..215ae407 100644 --- a/src/boards.c +++ b/src/boards.c @@ -149,6 +149,9 @@ void board_teardown(void) // Stop LF clock NRF_CLOCK->TASKS_LFCLKSTOP = 1UL; + + // Stop UART0 + NRF_UART0->ENABLE = 0; } static uint32_t _systick_count = 0;