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.

AM5728: EHRPWM1A OUTPUT is ON and OFF in am5728

Part Number: AM5728
Other Parts Discussed in Thread: SYSCONFIG

Hi ti expert,

I am working on AM5728 chip and using ubuntu with kernel 4.14.108-ti-r136. The issue come with ehrpwm1a and egrpwm1b pins of ball number G6 and F2.

The output of PWM is not correctly i check waveform. showing ON and OFF not gets continuous waveform.

Enable ehrpwm1. I write dts as per this thread as required change i done in my dts.

https://e2e.ti.com/support/processors/f/processors-forum/929657/am5728-beagle-x15-board-the-output-for-ehrpwm2a-pins-issue

I have 1 question regarding dtsi files.

I write my required change in bb-x15.dtsi file and included this file in the am57xx-beagle-x15.dts file.

my question is any other default dts file effect the bb-x15.dtsi file configuration ?

Please Help me.

Regarding 

Ajay

  • Ajay,

    I am assuming bb-x15.dtsi is a new dts file you have defined? I have 4.19 based kernel and i do not see that dtsi file.
    Did you mean arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi?

    You need keep tracing back with the include file starting from dts file and check all the included files to check if some other dtsi file is over-writing your changes.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for reply.

    Yes i created new bb-x15.dtsi in arch/arm/boot/dts/bb-x15.dtsi. All required changes done in that file.but my question same as default complied 

    files affects this changes.?

    i check all file No one affect the my file.

    for your information i can share i video of PWM output which fluctuation the result.

    My main focus on pwm output  which is not get correctly.

    I try for ehrpwm1A, ehrpwm1b,ehrpwm2A and ehrpwm2B will same result output is come but Not get continuous result.

    Please help me.

    Regarding

    Ajay 

  • Hi Keerthy,

    Thanks for reply.

    For better understanding the issue. I can share the video of PWM output which Discontinuous waveform in output of ehrpwm1A pin.

    I try for ehrpwm1A, ehrpwm1b,ehrpwm2A and ehrpwm2B will get same result of output.

    Please help me.

    Regarding

    Ajay 

  • Ajay,

    Can you help us with the values that you are programming into sysfs nodes?

    what are the period, duty cycle and polarity values?

    Can you try something like period of 1 second with 50% duty cycle and also set the same on x & y axis of your
    scope and capture the video?

    - Keerthy

  • i Keerthy,

    Thanks you so much for quick reply.
    Its working fine with 1KHz frequency and 50% duty cycle but other value of duty cycle likes 5% 10% and 90%.It work for sometime and periodically goes to zero.
    Example:for 1KHz frequency and 5% duty_cycle.
    echo 1000000 > period
    echo 50000 > duty_cycle
    echo 1 > enable
    Please find attached video with 1KHz frequency and 5% duty cycle. and let us know if have any suggestion regarding this issue.

    Thanks.
    Ajay

  • Ajay,

    Thanks for the data points!

    Can you also confirm with 0 duty cycle that it always stays high and vice versa where in it always stays low.
    Also what are the x-axis/y-axis units on the scope?

    - Keerthy

  • Hi keerthy,

    Thanks for quick reply.

    I also checked with 0% and 100% duty cycle.it works low for 0% and high for 100% duty cycle.

    Thanks

    Ajay

  • Thanks for all the testing Ajay. So issue is always with 5%, 10% duty cycle. What is  your requirement? You want to program any random
    duty cycle percentage?

    - Keerthy

  • Hi keerthy ,

    Thank you got quick responses.

    Yes ,Requirement is to run pwm with different period and duty cycle. Right now we are focusing on 10% and 5 % duty cycle with 1khz frequency.

    Next we want to try for 100khz 10% and 20% duty cycle.

    Please help us to resolve this issue with 1khz.

    Thanks

    Ajay

  • Ajay,

    One suspect is smart idle mode. Can you try the diff and see if it helps:

    git diff arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    index 6321258535..1398dfe904 100644
    --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
    @@ -541,7 +541,7 @@ static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
            .sysc_offs      = 0x4,
            .sysc_flags     = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
                              SYSC_HAS_RESET_STATUS,
    -       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
    +       .idlemodes      = (SIDLE_FORCE | SIDLE_NOT),
            .sysc_fields    = &omap_hwmod_sysc_type2,
     };
     
    Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for reply.

    Currently Digital oscilloscope is not available. It's available in next weeks. I will check and inform you.

    Thanks for Help

    Thanks

    AJay