diff --git a/bootloader/F4/Src/main.c b/bootloader/F4/Src/main.c index abda4430..df436d38 100644 --- a/bootloader/F4/Src/main.c +++ b/bootloader/F4/Src/main.c @@ -79,7 +79,7 @@ static uint8_t CMD_SIGNATURE[7] = {'B','T','L','D','C','M','D'}; /* Command: */ static uint8_t CMD_DATA_RECEIVED[8] = {'B','T','L','D','C','M','D',2}; -uint8_t new_data_is_received = 0; +volatile uint8_t new_data_is_received = 0; static uint8_t pageData[SECTOR_SIZE]; typedef void (*funct_ptr)(void); diff --git a/bootloader/F4/Src/usbd_custom_hid_if.c b/bootloader/F4/Src/usbd_custom_hid_if.c index e18a0d42..ceca737a 100644 --- a/bootloader/F4/Src/usbd_custom_hid_if.c +++ b/bootloader/F4/Src/usbd_custom_hid_if.c @@ -61,7 +61,7 @@ /* USER CODE BEGIN PV */ /* Private variables ---------------------------------------------------------*/ extern uint8_t USB_RX_Buffer[CUSTOM_HID_EPOUT_SIZE]; -extern uint8_t new_data_is_received; +extern volatile uint8_t new_data_is_received; /* USER CODE END PV */ /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY