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.

Diving into PWM with OMAPL138

Other Parts Discussed in Thread: OMAPL138

After some time struggling with the OMAPL138 I've finally been able to set up the LCDK with Linux running as desired.

My goal is to use PWM with the LCDK. I followed the instructions given at http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_U-Boot and compiled the kernel.

Then i tried to follow http://processors.wiki.ti.com/index.php/OMAP-L1_Linux_Drivers_Usage#eHRPWM however my directory /class/pwm/ doesn't have anything inside, it's empty.

I'm using the last linux-davinci kernel from http://arago-project.org/git/projects/?p=linux-davinci.git;a=summary. I'm quite new to embedded systems so i fear i'm missing something.

Víctor.

  • Has anybody faced a situation like this one? Why could this be happening?

  • Hi again,

    After getting more in touch the code and debugging it a bit through printk i realized that the function in charge of initializing the ehrpwm driver through the platform_driver structure (see Documentation/platform.txt) is probe. In this particular case  the function ehrpwm_probe which never gets called.

    As far as i've read (and understood) this functions is called by the kernel itself but it's not getting called. Can anybody give me some insight into this?
    I'm guessing that there should be some trouble with my pin configuration but i can't get any further.

     

  • Hi,

    May be looks like eHRPWM is not enabled, follow this link to enable it.

    Regards,

    --Prabhakar Lad

    http://in.linkedin.com/pub/prabhakar-lad/19/92b/955

  • Hi Prabhakar Lad,


    Thanks for your answer but unluckily it is enabled. I checked that a thousand times already. I tried so set up just the ehrpwm, the ehrpwm together with the ecap (paying attention to the conflicts with the SPI and so on of course).

    Still no luck. My guess is that i'm having some trouble with the pinmux thing which is something that is not quite clear for me yet. I sort of followed this previous post http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/48317.aspx.

    Victor.

  • Well it seems that after struggling a lot i sort of ended up finding the solution.

    If my understanding is not mistaken, the reason why it's not appearing is because the board configuration that the LCDK is following doesn't include the eHRPWM by default. The board configuration is found under arch/arm/mach-davinci/board-omapl138-hawk.c. This file should be modified so that it configures the eHRPWM.

    Also, if anybody is thinking about driving motors with this module i would first check that it doesn't have any conflicts with the other functions multiplexed in those pins. I didn't consider this from the beginning and it ended up being fatal. Still, more experienced achieved.

    Víctor