Stm32h7 HRtim input capture ability
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-01 2:56 AM
Can I measure low pulse duration(>10ns) using the STM32H Hrtim?
Hi all,
I'm new to STM32H7 development. So I'm hoping to get some help to start.
I need to measure pulse duration in 5- nanoseconds resolution or less. I then need to transfer the measured .
I have been looking at STM32H7 series MCU with the high resolution timer(ns). Can anyone comment if the Stm32H7 Hrtim would be able to do this measurement?
If yes, can you give me a starting point where to start in regards to measuring the pulses?
If no, which another mcu that would be suitable for my use?
Thanks in advance.
- Labels:
-
HRTIM
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-01 3:54 AM
Hi,
I posted some info in this similar issue, including a test project for a H743 Nucleo.
- https://community.st.com/s/feed/0D53W00001KUhOPSA1
- STM32H743ZI2-Nucleo144_TestsPR01.zip
- This test project isn't optimized, and isn't set for 5nsec, you'll have to modify it.
- See also the links about Input Capture in that message thread.
If you run the STM at 200MHz or higher then I expect you can get your resolution, but you will need to be careful how often you do that as it wouldn't leave any time for any code.
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-01 10:33 PM
Hello Paul,
Thanks for your feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-02 12:46 AM
I think most STMs which can run with a cpu clock >= 200 MHz have a timer running with max clock that can be used for input capture, so you could achieve an accuracy of +-5ns.
As long as the input signal's pulse duration isn't very low, you might solve it with interrupts, otherwise use DMA (I'd prefer this anyway).
Lots of info, example code and tutorials out there about STM32 timers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-09-06 4:29 AM
Hi,
I wanted to review the link you sent, but I can't find it. Can you share again?
