Break / PWM - STM32F4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-09-27 1:30 AM
Posted on September 27, 2012 at 10:30
Hi Folks,
I like to disable PWM, on an external event - i want to use BKIN. i set the break mechanism up like this ------...... GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_TIM1); /* Automatic Output enable, Break, dead time and lock configuration*/ TIM_BDTRInitStructure.TIM_OSSRState = TIM_OSSRState_Enable; TIM_BDTRInitStructure.TIM_OSSIState = TIM_OSSRState_Enable; TIM_BDTRInitStructure.TIM_LOCKLevel = TIM_LOCKLevel_1; TIM_BDTRInitStructure.TIM_DeadTime = 30; TIM_BDTRInitStructure.TIM_Break = TIM_Break_Enable; TIM_BDTRInitStructure.TIM_BreakPolarity = TIM_BreakPolarity_High; TIM_BDTRInitStructure.TIM_AutomaticOutput = TIM_AutomaticOutput_Enable; TIM_BDTRConfig(TIM1, &TIM_BDTRInitStructure);....
PWM works, but when i activate PB.12, nothing happens... i expect PWM to stop ... .any hints ??/Finn #pwm #cross-posted
Labels:
- Labels:
-
TIM
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-09-27 8:07 AM
Posted on September 27, 2012 at 17:07
TIM_BDTRInitStructure.TIM_OSSIState = TIM_OSSRState_Enable; // OSSI not OSSR
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-09-27 9:37 AM
Posted on September 27, 2012 at 18:37
Hi all, problem solved,
BKIN pin must be set to GPIO_Mode_AF.....Thanks