diff --git a/radio/src/targets/common/arm/stm32/stm32_adc.cpp b/radio/src/targets/common/arm/stm32/stm32_adc.cpp index 4244a5d96a9..73c3be121b6 100644 --- a/radio/src/targets/common/arm/stm32/stm32_adc.cpp +++ b/radio/src/targets/common/arm/stm32/stm32_adc.cpp @@ -532,8 +532,10 @@ void stm32_hal_adc_wait_completion(const stm32_adc_t* ADCs, uint8_t n_ADC, (void)inputs; (void)n_inputs; + auto timeout = timersGetUsTick(); while(!_adc_completed) { // busy wait + if (timersGetUsTick() - timeout >= 300) break; } }