Hello!
I’ve recently joined the simplefoc community and I love whats going on here.
I have made a custom driver board based around an STM32F405 and is rated for 200 amps or so. It uses IR2181 drivers which have to be driven in 6 pwm mode and does not have an enable pin.
Everything is working great except shoot through occurs during the driver initialisation.
I have scoped the PWM outputs and i can see multiple of them toggle high very momentarily. Fortunately I have been using a current limited PSU which has likely saved the board.
After setting a few breakpoints and stepping through the code, I can see that this event is caused within init->_configure6PWM->_initHardware6PWMInterface->_initHardware6PWMPair->setMode
In which we now leave the simplefoc code scope.
Within setMode there is a call to pin_Pullconfig which is essentially a wrapper around LL_GPIO_SetPinPull which seems to configure the pin in pull up mode. This subsequently pulls the pin high for a short duration before it is set low, therefore causing shoot through.
I temporarily commented out setMode (not recommended as this could have negative effects else where) and this resolved the shoot through issue.