Stm32f103c8t6 pulses

Related to the the forum.
Post Reply
nikjayswal
Posts: 6
Joined: Tue Feb 25, 2020 9:16 am

Stm32f103c8t6 pulses

Post by nikjayswal »

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.
stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: Stm32f103c8t6 pulses

Post by stas2z »

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
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Stm32f103c8t6 pulses

Post by ag123 »

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
nikjayswal
Posts: 6
Joined: Tue Feb 25, 2020 9:16 am

Re: Stm32f103c8t6 pulses

Post by nikjayswal »

So had any ideas for frequency upto 200Khz or 300khz ? Without using or alternatively pulseIn/pulseInLong ?
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Stm32f103c8t6 pulses

Post by stevestrong »

You got 2 possible solutions.
Why don't you like them?
Post Reply

Return to “Ideas & suggestions”