2016-05-09 04:29 AM
Hi everybody,
I am trying to use the PWM Output feat of the board's timers. In particular, I am trying to use TIM3 to drive some DC motors. I found an example in the CubeMX material which used the same timer to do this, and I set up my code in a similar way. I tried with both TIM1 and TIM3, and what turned out is that, while TIM1 seems to work flawlessly, when I put to 0 the value of the pulse for TIM3 the output is still different from 0 (approximately 2.3/2.4 V). Can anybody explain me what is happening? (unfortunately I only have a tester, so I can't see the waveform on an oscilloscope)EDIT: this only happens on channel #1 (PE2)2016-05-09 07:55 AM
Hi ApBrandy,
I thinks you are using the STM32F303 device. You should check if PE2 pin configuration is correct (mode: GPIO_MODE_AF_PP , alternate: AF2 ) A similar example is in STM32CubeF3 at this path : \STM32Cube_FW_F3_V1.4.0\Projects\STM32F303RE-Nucleo\Examples\TIM\TIM_PWMOutput -Hannibal-