2013-10-21 07:22 AM
How can I count more then 50Mhz frequency with STM32F407 series.
#prescaler #input-capture #sample #frequency-counter #frequency-counter #frequency-counter2013-10-21 07:35 AM
How can I count more then 50Mhz frequency with STM32F407 series.
Use an external counter mode (counts using external source), and sample over a fixed period to integrate.2013-10-21 07:39 AM
2013-10-21 07:52 AM
Have you got any sample ?
I posted one for counting external pulses, not sure I've published a free complete solution.[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/STM32F4%20Timer%20External%20Pulse%20counting&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=134]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FSTM32F4%20Timer%20External%20Pulse%20counting&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=1342013-10-21 08:56 AM
The Data Sheet seems to say fEXT (Timer external clock frequency on CH1 to CH4) is 42MHz for timers on APB1 and 84MHz for timers on APB2. I may have misunderstood the terminology. I only glanced at the Data Sheet.
If there is a limitation, could you use an external IC hardware divider as a pre-scaler?2013-10-21 09:03 AM
There is a synchronizer on the externally facing pins, though if I recall that will be off the AHB, but the TIM units likely have their own. So, yes, I'd probably be cautious about aliasing effects, and check the docs thoroughly.
2013-10-21 09:15 AM
2013-10-21 09:30 AM
I don't think ~50 MHz should be a problem, though the synchronizer is going to introduce some amount of jitter related to how the two rates beat together, and relative clock drift. Dividing it down would help, if you can get it down in the 10's of KHz Input Capture and measuring the period would also work.
At around 84-90 MHz I'd definitely want to look at other solutions. The F429 can clock APB1 at 90 MHz (CPU @ 180 MHz), but USB wouldn't be usable.