Search found 2 matches

by pp5mgt
Mon Jan 11, 2021 11:47 am
Forum: Other Boards
Topic: Timer counter on STM32F407
Replies: 2
Views: 1994

Re: Timer counter on STM32F407

You've setup a quadrature decoder, which has 2 inputs. So whether changes in A1 will increase or decrease the count depends on the value on the other pin (A15 in your example). If you have nothing hooked up to A15 then it will be floating and will capacitively couple to nearby signals on the circui...
by pp5mgt
Fri Dec 18, 2020 8:15 pm
Forum: Other Boards
Topic: Timer counter on STM32F407
Replies: 2
Views: 1994

Timer counter on STM32F407

I'm trying to count events from a GPIO on STM32F407 from Discovery Board using Timer 2. import time import machine from pyb import LED, Timer, UART, ADC, Pin pin_a = pyb.Pin("A1", pyb.Pin.AF_PP, pull=pyb.Pin.PULL_NONE, af=pyb.Pin.AF1_TIM2) pin_b = pyb.Pin("A15", pyb.Pin.AF_PP, pull=pyb.Pin.PULL_NONE...