2020-08-19 09:05 AM
I'm using nucleo-h743zi2 with freeRTOS for drone flight controller project
before using h743, I tested my code on f429zi everything works fine
But after migrate to h743, All PWM channels on TIM4 does't work,
Prescaler and counter period is correct for 500Hz operation(prescaler:12-1 , counter: 40000-1, APB timer clock 240mhz)
With another timer (1, 3, 12) on same setting ,PWM works fine
Is there any special consideration for H743-TIM4 ??
Here's my git
2020-08-19 12:00 PM
> All PWM channels on TIM4 does't work,
What is the expected behaviour and how does the observed one differ?
Read out and check/post the TIM and relevant GPIO registers content.
JW
2020-08-19 02:59 PM
There isn't anything special about TIM4 that is relevant here. Gotta be something wrong in the code.
> sConfigOC.Pulse = 0;
This is a 0% duty cycle, so not really a PWM.
2020-08-20 08:58 AM
I want PWM signals that can control Drone motor controller(ESC).
50%~100% duty cycle, 500Hz
I've tested all Timer with same code and prescaler to generate demanded signals.
Every timer works fine except for TIM4. Only TIM4 generates 2.5Hz, 50%~100% duty cycle signal.
I'm using (i2c1, i2c2, UART3,8,7 SDMMC1), Is there any probability peripherals colliding each other?
2020-08-20 12:15 PM
Peripherals are independent, but if something else is also trying to use those pins, it's not going to work.
2020-08-20 12:20 PM
Read out and check/compare to working/post the TIM4 registers content.
Also check/post clock settings for TIM4 in RCC.
JW
2020-08-20 11:31 PM
And if "TIM4.PWM Generation Channel 1 -> Pulse" is raised from 0 to 20000, then the PWM will appear?