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
#define USER_PWM_FREQ_kHz (20.0)
This module defines the Pulse Width Modulation (PWM) frequency, in kHz.
PWM frequency can be set directly here up to 30 kHz safely (60 kHz MAX in some cases).
For higher PWM frequencies (60 kHz+ typical for low-inductance, high-current ripple motors), it is recommended to use the ePWM hardware and adjustable ADC SOC to decimate the ADC conversion done interrupt to the control system. This can be done by using the hardware decimation USER_NUM_PWM_TICKS_PER_ISR_TICK. If hardware decimation is not used in high PWM frequencies, there is a risk of missing interrupts and disrupting the timing of the control state machine.