2021-02-19 04:58 AM
I mean, I setup TIM1 CH1 as output PWM, One pulse mode, but I need to trigger it by my codes
for example which register should be set to high or low to generate a pulse on TIM1 CH1
Solved! Go to Solution.
2021-02-19 05:38 AM
You don't need any "trigger source" if you want to start the timer by software.
"Trigger" there means an input which, through hardware and the slave-mode controller (see TIMx_SMCR) enables the same TIMx_CR1.CEN bit.
https://community.st.com/s/question/0D53W00000ZWPHkSAP/generate-single-pulse-using-timer-using-hal-cubemx is a post of somebody who had a similar problem recently.
JW
2021-02-19 05:03 AM
TIM1->CR1 |= TIM_CR1_CEN;
JW
2021-02-19 05:10 AM
Thanks Waclawek.. so that, which is trigger source ? which trigger source I should select in config ?
2021-02-19 05:24 AM
is it right ?
Trigger source : ITR0
2021-02-19 05:38 AM
You don't need any "trigger source" if you want to start the timer by software.
"Trigger" there means an input which, through hardware and the slave-mode controller (see TIMx_SMCR) enables the same TIMx_CR1.CEN bit.
https://community.st.com/s/question/0D53W00000ZWPHkSAP/generate-single-pulse-using-timer-using-hal-cubemx is a post of somebody who had a similar problem recently.
JW
2021-02-19 05:41 AM
Thanks, I will try it and hope to reach it:grinning_face:
2021-02-19 10:10 PM
Dear Jan
It is working now,.. thank you