1 year ago
#267717
helpmepls
Is there a way to sample from an STM32 ADC at a specific frequency, without the use of interrupts?
For this specific problem, we are tasked to ensure that our ADC samples at a specific frequency, around 30kHz, as we need to sample an input which will have a frequency of at least 10KHz. The plan I had initially had was to set up a timer with interrupts and set the timer to have a 30KHz frequency, then have it generate an interrupt for every Hz and on this interrupt I would sample, however this is obviously a terrible idea since 30000 interrupts per second would most likely break everything I've done so far. All the ADC examples we have done so far did not require us to sample at a specific frequency and thus, simply keeping the HAL_ADC_GetValue in the main while loop was sufficient. We were also told that DMA would not be necessary to solve the problem. Any tips?
stm32
nucleo
0 Answers
Your Answer