AnsweredAssumed Answered

STM32F100VLDISCOVERY & One Pulse Mode (TIM2) Triggered by Button

Question asked by Darrin Weiss on Jan 30, 2018
Latest reply on Feb 6, 2018 by waclawek.jan

 I am trying to understand how to configure a timer in one pulse mode, using the STM32F100VLDISCOVERY board.  I have used STM32CUBEMX to configure the blue button (PA0) as TIM2_CH1 ("Channel 1 input capture direct mode"), and PA1 as TIM2_CH2 "(Channel2 PWM Generation").   (STM32CUBEMX project attached).

 

I added a single line to the project, just after the line that says: "MX_TIM2_Init();"  :

 

HAL_TIM_OnePulse_Start(&htim2, TIM_CHANNEL_2);

 

 

When I press the Blue Button, I see the "CC1IF" bit (SR register) momentarily toggle.  But I don't see a pulse on PA1.

 

I imagine I'm still missing a line of code or two, advice/assistance is greatly appreciated.

Attachments

Outcomes