Skip to content

Commit

Permalink
Hotfix for issue with blocking ADC chain
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic committed Sep 25, 2023
1 parent cbc35ad commit cf4a336
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions radio/src/targets/common/arm/stm32/stm32_adc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit cf4a336

Please sign in to comment.