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.

TMDX654IDKEVM: PRU ePWM example

Part Number: TMDX654IDKEVM
Other Parts Discussed in Thread: AM3358

I want to use the epwm in PRU to generate PWM signals to  let the servo controller working.  But for am65xx,  there is no sample code for EPWM.  And I also cannot find the "sys_pwmss.h" in the pru-icss-5.4.0 header files in the ti-processor-sdk-linux-am65xx-evm-06.01.00.08.  Someone can supply some information to solve this problem?  thanks.

  • Hello,

    We have not added a AM65x PWM example for the PRU Software Support Package yet (that is pru-icss-x.x.x). Let me check if we have any other AM65x examples floating around with PWM code.

    For AM65x, we did not create a spearate PWM subsystem header file like in some of the other devices. In the PRU Software Support Package, try searching include/am65x with something like "grep -r pwm" to see the PWM register defines.

    Regards,

    Nick

  • Did you want the PWM output to be controlled by ARM Linux, or by the PRU core?

    Regards,

    Nick

  • Hi Nick,

    Thanks very much for your help. I have found the PWM register defines in the am65x header files.

    Actually i want to use the PWM to control the servo controller. and eQEP for position feedback.

    I need realtime control and feedback, so i have to do these things in the PRU or R5 module. The A53 running Linux will only supply control arguments

    with rpmsg or IPC.

    I have found the "SimplePID Control Reference Design WithPRU®-ICSS Through Web Interface" for am3358. So i want to do the same things in he am65x.

    But i also need the PWM A/B output with phase difference. Even with am65x header files, i found it is still difficult for me to write the control code without sample in am65x.


    Best Regards,

    jerry

     

  • Hello Jerry,

    I did find one instance of AM65x ICSSG PWM code in RTOS Processor SDK 6.1. This firmware allows the entire PRU-ICSSG to act as an Arduino-style PWM being controlled by a driver the ARM core (as of SDK 6.1, the Linux driver side of ICSSG-PWM is not implemented). Hopefully it can act as a reference for you:

    pdk_am65xx_1_0_6\packages\ti\drv\pruss\example\apps\icssg_pwm\firmware\src

    Regards,

    Nick

  • Hi Nick,

    Thanks very much for your help, i will work on the sample as a reference.

    Best Regards,

    Jerry