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.

AM3352: Issue in capture compare functionality

Part Number: AM3352

Hello,

I m working with AM335x based board.

In my application, I want to test PWM waveform generation and capture compare input functionality on pin (spi0_cs1.ecap1_in_PWM1_out).

I am able to generate the PWM waveform using below command:

- echo '0' > /sys/class/pwm/pwmchip0/export

- echo 488281 > /sys/class/pwm/pwmchip0/pwm0/period

- echo 244140 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

- echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable

but I want to capture input signal or PWM waveform generated from other device, when i tried to open the capture file, it shows me below error

root@EVSE:/sys/class/pwm/pwmchip0/pwm0# ls
capture     duty_cycle  enable      period      polarity    power       uevent

root@EVSE:/sys/class/pwm/pwmchip0/pwm0# cat capture 
cat: read error: Function not implemented 

Can you please guide me about how to test or use capture compare functionality?

My dts file changes are as below:

  epwm_out_pins: pinmux_epwm_out_pins {
     pinctrl-single,pins = <
     AM33XX_IOPAD(0x960, PIN_OUTPUT | MUX_MODE2)                 /* (B16) spi0_cs1.ecap1_in_PWM1_out */
   >;
  };

&epwmss1 {
  status = "okay";
  ecap1: ecap@48302100 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&epwm_out_pins>;
  };
};