Main Site Documentation

STM32F4 pulse counting


#1

Would anyone happen to have some example code on how to do pulse counting on the STM32F4 via registers or RLPLite?

Thanks,
Bob


#2

No there’s nothing specifically in CodeShare for the STM32F4 using non-managed code.


#3

I have certainly thought of that but I’m not sure if its straightforward.


#4

@ rocketbob
i did this for the G120. https://www.ghielectronics.com/community/codeshare/entry/753

I have thought about doing this for the STM32F4 and have briefly looked through the data sheet and it is doable with the register access. you need to look at the timers there and perhaps use the link above as a starting point.

if you get that working please upload to the community.
best of luck.


#5

Thanks Mike, that looks like a very simple solution, a good example to go off of. I will be glad to post the code once I get some time to study the STM32F4 datasheet regarding how to set up a timer as a counter.

As always, its a time vs. effort thing for me, so I didn’t want to get too deep in RLPLite programming.


#6

Just started studying the datasheet. 17 timers!! Holy cow!