How to make PWM one shot output?
Hello, I need to make software triggered one pulse output for 300 ms. The question is what is the best way to do this? I have found that PWM can work in one-pulse mode, but it looks like it requires external trigger to start, which is not an option for me. The other option I thought about is to use and of pulse ISR to stop PWM, but I am not sure if it is the best way to do it.
The desired behaviour is following:
When needed I use function
HAL_TIM_PWM_Start();
It does one high pulse for 300 ms and then turns off.
Thank you in advance!