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.

Question about EPWM sample project in starterware

Other Parts Discussed in Thread: OMAPL138

dear TI members,

i just bought TI LCDK C6748 dev kit and just beginning to develop using TI DSP IC..

i load it with Starterware example project of EHRPWM..

i successfully build the project and make some modification with the Action qualifier register as below :

EHRPWMConfigureAQActionOnA(SOC_EHRPWM_1_REGS, EHRPWM_AQCTLA_ZRO_EPWMXAHIGH, EHRPWM_AQCTLA_PRD_DONOTHING,
EHRPWM_AQCTLA_CAU_EPWMXALOW, EHRPWM_AQCTLA_CAD_DONOTHING, EHRPWM_AQCTLA_CBU_DONOTHING,
EHRPWM_AQCTLA_CBD_DONOTHING, EHRPWM_AQSFRC_ACTSFA_DONOTHING);

it is successfully load and generate the PWM signal at EPWM1A pin..

i expect the resulted signal will be 1 full square wave in every period of PWM..

but the resulted signal is consisted of many square wave within 1 period of PWM signal as below picture..

is it normal that 1 period of PWM signal consisted as many square wave signal?

how can i make 1 full square wave signal every period of PWM?

thank you

  • Hi,

    Thanks for your post.

    I don't think, your configuration on Action qualifier output A control register (AQCTLA) is valid since the PRD and ZRO bits of AQCTLA are holding incorrect values. I think, you have disabled the PRD bit field and it will not perform any action when the counter reaches exactly equal to the time period value since it is set as "EHRPWM_AQCTLA_PRD_DONOTHING". I would recommend you to set this as "EHRPWM_AQCTLA_PRD_EPWMXALOW" as per original code. Also, I would suggest you to disable the ZRO bit field and it will not perform any action when the counter reaches zero.

    By configuring the above, i think, you will get the PWM signal according to the time period configured by the action qualifier.

    Thanks & regards,
    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question

    -------------------------------------------------------------------------------------------------------

     

  • Hi sivaraj,

    thanks for your response..

    i already try the original code , and the result was the same.. the resulted PWM signal was chopped with frequency around 5MHz..

    is it a power safe mode? how to disable this mode?

    my aim is to get the fully square PWM signal just like the video in this project :

    http://processors.wiki.ti.com/index.php/C6747_EHRPWM_Example#Rebuilding_the_Project

    with the chopped PWM signal, i find it is difficult to monitor the PWM by oscilloscope (difficult to capture using internal trigger)

    thank you

    Regards,

    Frans K

  • Hi,

    Thanks for your update.

    May be, we would recommend you to adjust the chopping PWM clock duty cycle & clock frequency through configuring the desired bit fields of CHPDUTY & CHPFREQ. I think, you could choose the appropriate divide ratio value of CHPFREQ to monitor the PWM through oscilloscope and likewise, you could adjust also the PWM chopping duty cycle to n/8 desired value to obtain the expected PWM signal.

    For more details, kindly refer section 17.4.5, PWM-Chopper submodule register in the omapl138 TRM as below;

    http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question

    -------------------------------------------------------------------------------------------------------

  • hi sivaraj,

    i already solve the problem.. it is because of  GenChopperWaveform() function..

    therefore i disable this function to get the clean PWM waveform..

    thanks for your help..

    regards

    franz