2025-03-05 12:50 PM - edited 2025-03-05 12:51 PM
Hello
Need help, need to set PWM in a one pulse mode, so that at start timer there would be a low level output for a time equal to value of CCRx, after compare the output would be change to a high level and would remain so after overflow and stopping the counter.
Now I use PWM Mode 2 and active high level (tried PWM Mode 1 and active low level), as a result, after the counter stops, the output goes to low level, as shown on the screenshot:
2025-03-05 3:27 PM
Set up the timer so the pulse is high when CNT = 0 and low when CNT >= 1 (so CCRx = 1), then adjust ARR for the length of pulse you want. You will have 1 count of delay before the pulse starts.