I implement a 3 Phase SPWM but from a look up table.
i have a hard time running STM32F405 to its maximum speed of 168MHz.
Just a single toggle command could give me a maximum frequency of 4-5MHz if i add more lines that frequency drops down to 400Khz.
Similarly i cant set a timer down to 300ns which i need for a pure SPWM signals.
CAN ANYONE HELP ?
It seems you try to do a pure software PWM.
But usually the controller has a PWM hardware.
Read the datasheet how to use PWM hardware.
Also there are many many hardware and code examples, application notes, descriptions and so on how to generate SPWM.
Read through them. In this forum ... or in the internet....or at the microcontroller manufacturer's internet site.