SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
PWM Frequency is set in the file user.h. Some motors require more PWM frequency than others, depending on the motor inductance. As a general rule, the lower the inductance of the motor, the higher the PWM frequency needed to avoid too much current ripple. In general, 20 kHz is recommended for the majority of motors, special cases where the PWM frequency is suggested to be higher are discussed in subsequent sections of this document.
Lower inductance motors require higher PWM frequency.
The following code example shows how to set the software for 20 kHz PWM frequency:
//! \brief Defines the Pulse Width Modulation (PWM) frequency, kHz
#define USER_PWM_FREQ_kHz (20.0)