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.

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/

  • 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 degrees
    
    int main() {
        // Initialize and configure the PWM module
        pwm_init();
    
        // Configure PWM A with specified frequency and phase
        pwm_config(PWM_A, PWM_A_FREQUENCY);
        pwm_set_phase(PWM_A, PWM_A_PHASE);
    
        // Configure PWM B with specified frequency and phase
        pwm_config(PWM_B, PWM_B_FREQUENCY);
        pwm_set_phase(PWM_B, PWM_B_PHASE);
    
        // Start PWM signals
        pwm_start(PWM_A);
        pwm_start(PWM_B);
    
        // Main program loop
        while (1) {
            // Your application logic here
        }
    
        return 0;
    }
    

    Regards,

    Gary

  • 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 

  • 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

  • ok,i try to use the interface of "ti/csl/src/ip/epwm/",but i found that can not be used, is there any other interface?

  • Hello,

    Thank you for your interest in TI products! In order to solve your problem more effectively, we recommend that you post your problem on the E2E English technical forum (e2e.ti.com/.../processors-forum), and senior English forum engineers will provide you with help. If you have concerns about expressing yourself in English, please feel free to tell us and we will try our best to help you.

    Regards,

    Gary