From b475c8391a87e3af93b1e1ab0004ca8e141a40b3 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Tue, 4 Dec 2018 19:34:30 -0500 Subject: [PATCH] this shouldnt run twice in a row or device can get bricked --- targets/stm32l442/src/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/stm32l442/src/device.c b/targets/stm32l442/src/device.c index f9c3c71..d7c0df4 100644 --- a/targets/stm32l442/src/device.c +++ b/targets/stm32l442/src/device.c @@ -91,10 +91,12 @@ void device_init() LL_GPIO_SetPinMode(SOLO_BUTTON_PORT,SOLO_BUTTON_PIN,LL_GPIO_MODE_INPUT); LL_GPIO_SetPinPull(SOLO_BUTTON_PORT,SOLO_BUTTON_PIN,LL_GPIO_PULL_UP); +#ifndef IS_BOOTLOADER #if BOOT_TO_DFU flash_option_bytes_init(1); #else flash_option_bytes_init(0); +#endif #endif printf1(TAG_GEN,"hello solo\r\n");