This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
In "user.h", I see the following:
//! \brief Defines the Pulse Width Modulation (PWM) frequency, kHz
//!
//#define USER_PWM_FREQ_kHz ((float32_t)(5.0)) //5KHz PWM frequency
//#define USER_PWM_FREQ_kHz ((float32_t)(10.0)) //10KHz PWM frequency
//#define USER_PWM_FREQ_kHz ((float32_t)(12.0)) //12KHz PWM frequency
//#define USER_PWM_FREQ_kHz ((float32_t)(15.0)) //15KHz PWM frequency
#define USER_PWM_FREQ_kHz ((float32_t)(20.0)) //20KHz PWM frequency
Can the PWM frequency be changed to 50.0 kHz or 100 kHz or 200 kHz?
If so, how is that accomplished within the MOTOR CONTROL SDK?
Note: i did try simply changing 20.0 to 50.0, but my example motor did not start spinning.
I am using the Piccolo 0049C Launchpad (C2000 LAUNCHXL-F280049C) with "TI BOOSTXL-DRV8320 Motor Drive Booster Pack"
//! \file solutions/boostxl_drv8320rs/f28004x/drivers/user.h
//! \brief Contains the user related definitions
//!
You can use a higher PWM frequency, but you need to set the right USER_NUM_PWM_TICKS_PER_ISR_TICK value to keep the ISR frequency (USER_ISR_FREQ_Hz) is lower than 20kHzto make sure that the ISR can be executed without overflow.
Can you provide specifics on getting 100kHz to work?
Can you also provide specifics on getting 120kHz to work?
As mentioned above, set the USER_PWM_FREQ_kHz and USER_NUM_PWM_TICKS_PER_ISR_TICK in user.h, and to ensure that USER_PWM_FREQ_kHz/USER_NUM_PWM_TICKS_PER_ISR_TICK is less than 20kHz.
So you can set these two parameters:
100kHz
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (5)
#define USER_PWM_FREQ_kHz ((float32_t)(100.0))
120kHz
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (6)
#define USER_PWM_FREQ_kHz ((float32_t)(120.0))