You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When trying to run the Frequency_Dutycycle_measurement example on an STM32F103C8 (bluepill) with input pin B4, the code is not able to capture any rising/falling edges.
The important piece of information here is that B4 is not the default pin for this timer but an alternate function pin. While for default pins, capturing edges with the HardwareTimer was fixed for the F1 family with PR #824, the AF bits of the pin function must still be retained and configured for non-default pins to be usable.
I have a working version commited here (ready for a PR): treitmayr@4f134ae
Expected behavior
Rising and falling edges are detected and frequency and duty cycle are reported on serial port.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
treitmayr
changed the title
[F1] Duty cycle / frequence measurement not working
[F1] Duty cycle / frequence measurement not working for AF pin
Apr 18, 2020
Hi @treitmayr
Thanks for highlighting this issue.
I made a PR to solve it: #1039
It is a little bit different than your implementation proposal, so let me know if tit solves your issue.
Description
When trying to run the Frequency_Dutycycle_measurement example on an STM32F103C8 (bluepill) with input pin B4, the code is not able to capture any rising/falling edges.
The important piece of information here is that B4 is not the default pin for this timer but an alternate function pin. While for default pins, capturing edges with the HardwareTimer was fixed for the F1 family with PR #824, the AF bits of the pin function must still be retained and configured for non-default pins to be usable.
I have a working version commited here (ready for a PR): treitmayr@4f134ae
Expected behavior
Rising and falling edges are detected and frequency and duty cycle are reported on serial port.
Desktop (please complete the following information):
Board:
The text was updated successfully, but these errors were encountered: