From 706b3246a1f48e663a6008004b0e4170d3854175 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Tue, 3 Jan 2023 18:46:26 +1100 Subject: [PATCH] Test better reboots --- source/Core/BSP/Pinecil/BSP.cpp | 5 +---- source/Core/BSP/Pinecilv2/BSP.cpp | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/source/Core/BSP/Pinecil/BSP.cpp b/source/Core/BSP/Pinecil/BSP.cpp index fa7cb267..5bac313d 100644 --- a/source/Core/BSP/Pinecil/BSP.cpp +++ b/source/Core/BSP/Pinecil/BSP.cpp @@ -72,10 +72,7 @@ void unstick_I2C() { uint8_t getButtonA() { return (gpio_input_bit_get(KEY_A_GPIO_Port, KEY_A_Pin) == SET) ? 1 : 0; } uint8_t getButtonB() { return (gpio_input_bit_get(KEY_B_GPIO_Port, KEY_B_Pin) == SET) ? 1 : 0; } -void reboot() { - // Spin for watchdog - for (;;) {} -} +void reboot() { eclic_system_reset(); } void delay_ms(uint16_t count) { delay_1ms(count); } uint32_t __get_IPSR(void) { diff --git a/source/Core/BSP/Pinecilv2/BSP.cpp b/source/Core/BSP/Pinecilv2/BSP.cpp index 0df95956..eb996bd8 100644 --- a/source/Core/BSP/Pinecilv2/BSP.cpp +++ b/source/Core/BSP/Pinecilv2/BSP.cpp @@ -126,8 +126,7 @@ uint8_t getButtonB() { } void reboot() { - // Spin for watchdog - for (;;) {} + hal_system_reset(); } void delay_ms(uint16_t count) {