SSTC Interrupter

Hi there,

I hope this is the right place for this question. If not, please feel free to move or delete!

I have a STM32401CC Black Pill that I am trying to use as a programmable interrupter for my solid state tesla coil.

In essense, it has a single output which sends pulses down the line to the driver to tell the driver when to switch the coil on and off.

This output should be a PWM driven pin (and this is where my headache starts)

I am struggling to find any code or libraries which will work and allow me to :
Set a pin in PWM mode using a specified channel of a specified timer
Set that timer to a given frequency (will be variable from 1hz to say 1000hz)
Set the duty cycle of that frequency from 1% to 99%

I will also use encoders to set and vary the frequency and duty cycle and display the data on a 16x2 LCD.

Once that is running, I would then also like to link a second timer to the first so that I can run the first timer in 'burst' mode.

Any suggestions or pointers to code snippets or libraries which would work with my core would be most appreciated!

Kind regards