cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103R8T TIM1 CHxN outputs disabled after UART1 remap

Lopez.Antonio
Associate II
Posted on July 06, 2017 at 13:31

Hello,

The STM32 device I'm using has a 64 pin package.

TIM1 is used for PWM control of a PMSM motor in FOC mode., connecting its 6 channels to a three phase IGBT bridge.

I don't remap TIM1, so PA8, PA9, PA10, PB13, PB14 and PB15 are configured as alternate function push pull outputs, and PB12 is configured as floating input for the BKIN function of TIM1.

In the same application, USART 1 is used for communicating with a host processor. USART1 is remapped to PB6/PB7 because default assignment is to pins PA9/PA10, which are needed for TIM1.

The problem is that after enabling and remapping USART1, the 3 low side channels from TIM1 stop working. If I comment out USART1 initialization code then all 6 channels from TIM1 work as intended, so I'm pretty sure the problem is related to USART1 configuration and/or remapping.

I've been looking at the errata sheet and found many remapping relating problems, but this specific one is not listed.

Did anybody else experience the same problem?

Thank you in advance.

#stm32-f1 #motor-control #tim1-pwm-complementary-outputs #usart1
1 REPLY 1
Posted on July 06, 2017 at 13:41

It is an old part assume most of the crowd has moved to newer parts.

Show the initialization code. Make sure the AFIO clock is enabled.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..