In reply to louis-alexandre.latchimy:
I don’t see any issue with the code and similar approach works fine for me. For debugging you can try replacing #CLK_HIGH and #CLK_LOW with some constant, add some print in start_clock to make sure sequence is behaving as intended. If possible try posting a sample code on what you are doing , it will be easier to help then.
Rohit