Timer PWM Input (Input capture mode)

General discussion about topics related to OpenMV.
Posts: 1
Joined: Mon May 07, 2018 4:13 pm

Timer PWM Input (Input capture mode)

Postby indianboy42 » Mon May 07, 2018 4:23 pm

Is there any way to be able to use the Timer pins as PWM inputs (to read the duty cycle/high time of a PWM signal from (for example) a distance sensor)?

I know that STM32 timers support this (I have done this using the SPL and HAL myself on f1 boards) but with the many layers of abstraction between the user and the MCU on the OpenMV I presume I would need some library support from you guys.

Any help would be much appreciated, thanks for all the great work you guys do
User avatar
Posts: 2593
Joined: Sun May 24, 2015 2:10 pm

Re: Timer PWM Input (Input capture mode)

Postby kwagyeman » Mon May 07, 2018 11:05 pm

See the Timer documentation:

http://docs.micropython.org/en/v1.9.3/p ... Timer.html

Micropython is the HAL, so, just google that and you should get hits.

https://github.com/dhylands/upy-example ... ic_test.py

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests