Replies: 1 comment 5 replies
-
The GPIO mode used to configure a pin as a TIMx_CH, is "alternate function" which different from output/input GPIO.
Otherwise, I'd suggest to check:
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am using a custom STM32F103C8T6 board. Part of the design is to determine a fans speed by its cyclic period, an example signal has been attached:
This fan has been connected to TIM3 ch2 PA7. See the device tree setup for this device:
Within my proj.conf, I have enabled CONFIG_PWM and CONFIG_PWM_CAPTURE.
I am currently experiencing an issue that occurs when I initialise the PWM capture for that pin. The PWM output of the fan seems to be 'driven' to low (0 voltage), seen by the logic analyser, which means I am unable to read a value from this pin, since no cycles are occurring. I'm unsure of what is causing this issue, the only idea in my head is that the pin by default is configured as an output pin, since PWM is typical an output signal, and is not reconfigured as an input pin when pwm_capture_usec, pwm_pin_configure_capture or pwm_pin_enable_capture is called. Any help would be greatly appreciated thanks
Beta Was this translation helpful? Give feedback.
All reactions