Skip to content

Commit ef09b21

Browse files
committed
Update stm32_mcu.cpp
1 parent 44f2ecc commit ef09b21

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/drivers/hardware_specific/stm32/stm32_mcu.cpp

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -184,34 +184,6 @@ void _alignPWMTimers(HardwareTimer *HT1, HardwareTimer *HT2, HardwareTimer *HT3,
184184
HT4->resume();
185185
}
186186

187-
// align the timers to end the init
188-
void _alignPWMTimers(HardwareTimer *HT1, HardwareTimer *HT2, HardwareTimer *HT3, HardwareTimer *HT4, HardwareTimer *HT5, HardwareTimer *HT6, HardwareTimer *HT7, HardwareTimer *HT8)
189-
{
190-
HT1->pause();
191-
HT1->refresh();
192-
HT2->pause();
193-
HT2->refresh();
194-
HT3->pause();
195-
HT3->refresh();
196-
HT4->pause();
197-
HT4->refresh();
198-
HT5->pause();
199-
HT5->refresh();
200-
HT6->pause();
201-
HT6->refresh();
202-
HT7->pause();
203-
HT7->refresh();
204-
HT8->pause();
205-
HT8->refresh();
206-
HT1->resume();
207-
HT2->resume();
208-
HT3->resume();
209-
HT4->resume();
210-
HT5->resume();
211-
HT6->resume();
212-
HT7->resume();
213-
HT8->resume();
214-
}
215187

216188

217189

@@ -686,8 +658,6 @@ void* _configure3PWM(long pwm_frequency,const int pinA, const int pinB, const in
686658

687659

688660

689-
690-
691661
// function setting the high pwm frequency to the supplied pins
692662
// - Stepper motor - 8PWM setting
693663
// - hardware specific
@@ -699,7 +669,7 @@ void* _configure8PWM(long pwm_frequency, float dead_zone, const int pin1A, const
699669
return (STM32DriverParams*)SIMPLEFOC_DRIVER_INIT_FAILED;
700670
}
701671
if( !pwm_frequency || !_isset(pwm_frequency) ) pwm_frequency = _PWM_FREQUENCY; // default frequency 25khz
702-
else pwm_frequency = _constrain(pwm_frequency, 0, _PWM_FREQUENCY_MAX); // constrain to |%0kHz max
672+
else pwm_frequency = _constrain(pwm_frequency, 0, _PWM_FREQUENCY_MAX); // constrain to 50kHz max
703673
// center-aligned frequency is uses two periods
704674
pwm_frequency *=2;
705675

0 commit comments

Comments
 (0)