cancel
Showing results for 
Search instead for 
Did you mean: 

Starting timers in one pulse mode

LCatL
Associate II

Hello everyone,

I read many of the posts on the forum and couldn't find an answer to this question: is there any way to start timers in one pulse mode other than through an external stimulus? that is, only through software? How could it be done?

I am looking for a way to control a three-phase full-wave rectifier and the trigger for the thyristors is exactly the one pulse format, being necessary only to adjust the period (delay + pulse) for the duration of a semicycle. The 6 initial pulses will be controlled in this way and the rest will be controlled in the same way, using another timer for 30 degree lag. Is it doable? if not, what would be the best way to do this control? how would the time difference between the phases be during the timer control?

The question is due to the fact that the current hardware provides zero crossing inputs on pins that are not suitable for One Pulse mode, so I will use interrupts for these signals (thus the need to start timers in One Pulse mode by software) .

Using mcu stm32f302r, Cube MX (but able to use direct register manipulation, if necessary) and mostly CubeIDE. Any advice, please?

Thank you very much for any help ....

LuizF

1 ACCEPTED SOLUTION

Accepted Solutions

You start the timer - no matter whether one-pulse (i.e. TIMx_CR1.OPM=1) or "normal" (OPM=0) - by setting TIMx_CR1.CEN bit. You can do it by software, or by hardware through the slave-mode controller, setting it to Trigger mode (in TIMx_SMCR.SMS). Source of this trigger may be external - one of channels 1 or 2, or ETR pin - or internal - another timer - see TIMx_SMCR.TS.

JW

View solution in original post

2 REPLIES 2

You start the timer - no matter whether one-pulse (i.e. TIMx_CR1.OPM=1) or "normal" (OPM=0) - by setting TIMx_CR1.CEN bit. You can do it by software, or by hardware through the slave-mode controller, setting it to Trigger mode (in TIMx_SMCR.SMS). Source of this trigger may be external - one of channels 1 or 2, or ETR pin - or internal - another timer - see TIMx_SMCR.TS.

JW

LCatL
Associate II

Thank you for the answer!

Will study 🙂 ...