2013-01-11 02:12 AM
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 #pwm2013-01-11 08:16 AM
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.2013-01-27 09:52 PM
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.