Skip to content

Commit 5f06497

Browse files
committed
teensy 3 typo in frequency multiplication
1 parent 7d6d1da commit 5f06497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drivers/hardware_specific/teensy/teensy3_mcu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ int _findTimer( const int Ah, const int Al, const int Bh, const int Bl, const i
146146
void* _configure6PWM(long pwm_frequency, float dead_zone, const int pinA_h, const int pinA_l, const int pinB_h, const int pinB_l, const int pinC_h, const int pinC_l) {
147147
if(!pwm_frequency || !_isset(pwm_frequency) ) pwm_frequency = _PWM_FREQUENCY; // default frequency 25khz
148148
else pwm_frequency = _constrain(pwm_frequency, 0, _PWM_FREQUENCY_MAX); // constrain to 50kHz max
149-
unsigned long pwm_freq = 4*pwm_frequency; // center-aligned pwm has 4 times lower freq
149+
unsigned long pwm_freq = 2*pwm_frequency; // center-aligned pwm has 4 times lower freq
150150
_setHighFrequency(pwm_freq, pinA_h);
151151
_setHighFrequency(pwm_freq, pinA_l);
152152
_setHighFrequency(pwm_freq, pinB_h);

0 commit comments

Comments
 (0)