TI中文支持网
TI专业的中文技术问题搜集分享网站

TDA4VM: TDA4 RTOS SDK how to use pwm int r5f

Part Number:TDA4VM

I want to generate two PWM with the same origin but different phases

PWM A is 2000Hz, and PWM B is 20Hz

On RTOS SDK 08_ 06_ 01_ How can I implement 03? I can't find the relevant demo or documentation

or how to use the interface in pdk_jacinto_08_06_01_03/packages$ cd ti/csl/src/ip/epwm/

Gary Lu:

Hello,

TI does not have this demo, I help you write a demo example, please refer to

// Define the PWM frequencies
#define PWM_A_FREQUENCY 2000// Frequency of PWM A in Hz
#define PWM_B_FREQUENCY 20// Frequency of PWM B in Hz// Define the PWM phases (in degrees)
#define PWM_A_PHASE 0// Phase of PWM A in degrees
#define PWM_B_PHASE 90// Phase of PWM B in degreesint main() {// Initialize and configure the PWM modulepwm_init();// Configure PWM A with specified frequency and phasepwm_config(PWM_A, PWM_A_FREQUENCY);pwm_set_phase(PWM_A, PWM_A_PHASE);// Configure PWM B with specified frequency and phasepwm_config(PWM_B, PWM_B_FREQUENCY);pwm_set_phase(PWM_B, PWM_B_PHASE);// Start PWM signalspwm_start(PWM_A);pwm_start(PWM_B);// Main program loopwhile (1) {// Your application logic here}return 0;
}

Regards,

Gary

,

ting cai:

hello,

Where are the functions defined?

pwm_start、pwm_init、pwm_config、pwm_set_phase、pwm_start

i can not find the api in the TDA4 rtos sdk 

,

Gary Lu:

Hello,

Since TI doesn't have a demo, this is just an example that I wrote through my personal understanding, and this is just the definition that I listed

Regards,

Gary

赞(0)
未经允许不得转载:TI中文支持网 » TDA4VM: TDA4 RTOS SDK how to use pwm int r5f
分享到: 更多 (0)