Count rising edges by Generating PWM signal without sacrificing GPIO(using debian image)

i have generate a PWM signal and count 4096 rising edges.(PWM is necessary ) for now i’m using just a GPIO interrupt, i connect the PWM output to the GPIO pin but i would like to know if it would be possible to not sacrifice GPIO’s

PWM Generated by:

echo 0 > export
echo 1000000 > pwmchip1/pwm0/period
echo 500000 > pwm0/duty_cycle
echo 1 > pwm0/enable
echo “normal” > pwm0/polarity

HI @rajat7693

Could you provide the version of the hardware (including carrier board) and software of your module?

Regarding your issues, I have some questions:

  • What is your application?
  • What exactly are your trying to do?
  • What is your current code implementation? Could you provide an example code?

Best regards,
Jaski