Stm32f103c8t6 pulses
-
- Posts: 6
- Joined: Tue Feb 25, 2020 9:16 am
Stm32f103c8t6 pulses
Need some idea or suggestion i want to read pulses fast as possible want to measure pulses upto 2MHz. The pulseIn/pulseInLong has limitions so it can not work greater than 100KHz.
Re: Stm32f103c8t6 pulses
im not sure it's possible with any core, but using HAL/CMSIS or in general as a concept it can be implemented using two timers
one timer in input capture mode capturing raising (or falling) edge, and second timer triggered by first timer overflow
target frequency will be timer2 count * timer 1 overflow value / time
one timer in input capture mode capturing raising (or falling) edge, and second timer triggered by first timer overflow
target frequency will be timer2 count * timer 1 overflow value / time
Re: Stm32f103c8t6 pulses
if what you need is square waves, this logic analyzer on stm32f401 black pill goes up to 5mhz
viewtopic.php?f=10&t=116
and this logic analyzer that runs on stm32f103 (blue pill)
https://github.com/ddrown/stm32-sump
does 7 mhz
dma can normally handle square wave trains in the low mhz regions. apparently it is a challenge (possibly not achievable) to attempt high mhz transfers with simply gpio and dma. for even higher mhz than 5mhz, only specialised interfaces such as high speed ulpi 60mhz, ethernet 50mhz can do those
viewtopic.php?f=10&t=116
and this logic analyzer that runs on stm32f103 (blue pill)
https://github.com/ddrown/stm32-sump
does 7 mhz
dma can normally handle square wave trains in the low mhz regions. apparently it is a challenge (possibly not achievable) to attempt high mhz transfers with simply gpio and dma. for even higher mhz than 5mhz, only specialised interfaces such as high speed ulpi 60mhz, ethernet 50mhz can do those
-
- Posts: 6
- Joined: Tue Feb 25, 2020 9:16 am
Re: Stm32f103c8t6 pulses
So had any ideas for frequency upto 200Khz or 300khz ? Without using or alternatively pulseIn/pulseInLong ?
-
- Posts: 505
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Stm32f103c8t6 pulses
You got 2 possible solutions.
Why don't you like them?
Why don't you like them?