TIM2 Output Only CH3/4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-01-11 2:12 AM
Posted on January 11, 2013 at 11:12
Here is a STM32F103-question.
TIM2 is using TIM_OCMode_PWM1 and TIM_OPMode_Single (one-pulse mode).Im using TIM2 CH1 for (internal) triggering ADC injected reads using a compare. Im using TIM2 CH2 for (internal) triggering ADC regular reads using another compare.TIM2 CH1 and CH2 is therefore not connected to any IO-pins.But now I need to generate a PWM-signal on output pins PB10/11 which is TIM2-CH3/CH4.IS it possible (at all) to use the TIM2 in this way, meaning CH1/CH2 not connected to any IO-pins and CH3/CH4 connected to PB10/11 ?The way I understand it, if I use the remap, it will hook up TIM2-CH3/CH4 to PB10/PB11 and that is fine, BUT it will also hook up TIM2-CH1/CH2 to PA0/PA1 and that is not possible since I use those for a analog inputs.Could someone please clarify this to me ? #tim2 #alternate-remap #pwm
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
‎2013-01-11 8:16 AM
Posted on January 11, 2013 at 17:16
Are you configuring PA0/PA1 in AF mode?
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; If not they should not route to the timer in a meaningful way.
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
‎2013-01-27 9:52 PM
Posted on January 28, 2013 at 06:52
You are right. I made some experiments and have confirmed that it is indeed possible to have it working with the PA0/PA1 as analog inputs if they are not hooked up to the timer in the way you suggest.
