I have been using the pigpio library as a modified spi interface to send and receive serial data. I use Chip Select, Clock, and Data Lines but i am using "bit-banging" for the timing between bits. Using the hardware_PWM function I have had a stable clock signal at 800Hz but when I try to increase the frequency to something much faster like 5Khz I seem to have no response on the GPIO CLK pin. Could someone please explain how this function works?

I have included a part of my code and clock signal result for reference.

start_tick = pi1.get_current_tick()  ## starts timer 
cb1 = pi1.callback(18,pigpio.RISING_EDGE,clockstart)   ## callback function that runs clockstart once a rising edge is seen on clock pin 18.
pi1.hardware_PWM(18,800,500000)   ## uses gpio18(pin 12) as clock at 800Hz, enables clock at duty cycle 50%

enter image description here I am using the Raspberry Pi Model 4B so I believe I should be following the steps for the BCM2711.I have included a link to pigpio documentation and I am unsure about the amount of steps they ask for.

hardware_PWM Info

1 Answer 1


There are known problems on the Pi4B and later (the Pis with the BCM2711).

We have not discovered the reason and currently there is no known fix.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.