-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pwm-input setting for TI2 is wrong #375
Comments
I don't know if it's the intention of the code, but both set, I believe, is capture on both edges. |
yes, that is correct, it means capture on both edges, but I still think that is incorrect. cc1np/cc1p are 00 |
Looks like original comments from RM0368/RM0383 (F401), chapter 12.3.7 or something |
I believe you refer to this statement in RM0368:
The equivalent statement in RM090 is this:
|
I haven't checked whether this is really not working, I was just reviewing the code when I discovered this.
This is the code for setting the active polarity for capture in CCR2 the Timer::pwm_input function:
stm32f4xx-hal/src/pwm_input.rs
Lines 118 to 122 in aaa1096
From documentation (chapter 18.3.6 of the Reference manual RM0090):
Select the active polarity for TI1FP2 (used for capture in TIMx_CCR2): write the CC2P bit to ‘1’ and the CC2NP bit to ’0’(active on falling edge).
I believe the code is not according to documentation, at least for STM32F405/415, STM32F407/417, STM32F427/437 and STM32F429/439 which are referenced in RM0090 from STM
The text was updated successfully, but these errors were encountered: