Thank you for posting this video, used it as reference to sync timer 3 and 1 on STM32G070.
@tszulpinedo7573 жыл бұрын
Perfecto. Ah que bella práctica, no pues sí eh. ST son de otro mundo...
@Pyrografpl2 жыл бұрын
Thank you, that was exactly what I was googling for my project :)
@MCSGproject2 жыл бұрын
this guy definitely a chad irl
@ahmetturan6183 жыл бұрын
thank you
@bacnguyenkhac1543 жыл бұрын
thank you sir for this useful mannual !! so how about using gated mode, sir, thanks so much !
@humayunsiraj16162 жыл бұрын
thankyou so much
@stangarcia3 жыл бұрын
Top
@kaankurtca9 Жыл бұрын
thank you, I can generate pwm signals with phase difference between them, but when I stop and restart, TIM2 PWM does not turn on. Anyone who can help? start code: HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1); HAL_TIM_OC_Start(&htim1, TIM_CHANNEL_2); HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); stop code: HAL_TIM_PWM_Stop(&htim1, TIM_CHANNEL_1); HAL_TIM_OC_Stop(&htim1, TIM_CHANNEL_2); HAL_TIM_PWM_Stop(&htim2, TIM_CHANNEL_1); I communicate with STM32 via UART using C# windows form application. For example: If I send 0x50, PWMs are turned on, if I send 0x51, PWMs are turned off.
@kaankurtca9 Жыл бұрын
Edit: When I restrart TIM2 PWM turns on too but its Duty Cycle %100
@julien678711 ай бұрын
@@kaankurtca9 Hello, Same problem here, I see you asked the question on stackoverflow too. As I understand, the problem was not solved yet on it. Since, have you fix the problem ? I am interested in the answer ^^ Regards
@kaankurtca911 ай бұрын
@@julien6787 Hello, i have fixed the problem. I found a way to reset TIM2 by writing register level code (Reference Manual Document). Thank goodness it worked. So, instead of the command to turn off the PWMs, I use the direct reset of the timer. When I run the command to turn on the PWMs again, the PWMs turn on properly.
@julien678711 ай бұрын
@@kaankurtca9 Thank you for your answer! So you don't use at all the HAL functions like HAL_TIM_PWM_Stop right ? I will try what you said about registers level on my stm32h7.
@kaankurtca911 ай бұрын
@@julien6787 I don't use HAL_TIM_PWM_Stop. İnstead of, I use following codes to turn off all pwm signals RCC->APB2RSTR = RCC_APB2RSTR_TIM1RST; RCC->APB1LRSTR = RCC_APB1LRSTR_TIM2RST | RCC_APB1LRSTR_TIM3RST | RCC_APB1LRSTR_TIM4RST; __DMB(); RCC->APB2RSTR = 0; RCC->APB1LRSTR = 0;