cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303 PWM control via CubeMX HAL

frackers
Senior
Posted on May 03, 2016 at 06:34

Greetings all

I'm using  HAL_TIM_PWM_ConfigChannel() to set the Pulse value for my PWM output but I want to modulate it (think IR LED on/off keying) so I'm currently using HAL_TIM_PWM_Start() and HAL_TIM_PWM_Stop(). The latter leaves the output in a high impedance state which causes the output to drift around falsely turning on a MOSFET driver. 

Can I directly manipulate the output using the GPIO registers or are they totally disabled due to the mode being set to GPIO_MODE_AF_PP (alternate function) or is there a recognised way I can do this with minimal overhead (preferably staying with the HAL)?

0 REPLIES 0