Asynchronous ADC timed readings #13742
Answered
by
peterhinch
saraverbeecke
asked this question in
STM32 / Pyboard
-
For the stm32 port it is possible to read the ADC in a timed manner. See docs. Should it be possible to use this in a non-blocking way? |
Beta Was this translation helpful? Give feedback.
Answered by
peterhinch
Feb 26, 2024
Replies: 1 comment 4 replies
-
The docs you linked to explicitly state that the function is blocking.
Can you explain what you are trying to achieve? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1KHz is too fast for an
asyncio
solution. One approach would be to do the ADC read in a hard ISR. The micropython-filters repo illustrates realtime data capture on STM32. The lpf.py demo uses a timer ISR to capture data.