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
I was trying to generate a 512kHz PWM signal from a 64MHz AHB clock, but when verifying the signal in the laboratory,
I found that the frequency was off, in a way consistent with the the ARR being off by one.
I was trying to generate a 512kHz PWM signal from a 64MHz AHB clock, but when verifying the signal in the laboratory,
I found that the frequency was off, in a way consistent with the the ARR being off by one.
stm32l4xx-hal/src/pwm.rs
Line 202 in bf2ded1
This situation is also alluded to in the linked comment.
Changing line 200 to :
let ticks = clk / freq - 1;
Gave me the correct output frequency. I intend to make a PR linked to this issue.
The text was updated successfully, but these errors were encountered: