cancel
Showing results for 
Search instead for 
Did you mean: 

TIM3 partial remap for PWM on pin PB5 and conflict with I2C1

kwiatkowski
Associate II
Posted on February 27, 2012 at 10:42

I have the following situation:

- I have a STM32F103RB processor.

- Timer 3 configured to generate a PWM signal at the output of PB5. I had to use partial_remap and channel 2 of the timer.

Up to this point everything is working properly.

- The situation changes if the clock is attached to the I2C1. At this point I have a problem because the output PWM signal PB5 disappears.

I do not need no alternate functions for the I2C on this pin.

How can I solve this problem?

#read-the-errata #tim3-partial-remap-pwm-pb5-i2c1
1 REPLY 1
Posted on February 27, 2012 at 17:17

From the ERRATA document

2.4.8 I2C1 and TIM3_CH2 remapped

Conditions

�? I2C1 and TIM3 are clocked.

�? I/O port pin PB5 is configured as an alternate function output.

Description

Conflict between the TIM3_CH2 signal and the I2C1 SMBALERT signal, (even if SMBALERT is not used).

In these cases the I/O port pin PB5 is set to 1 by default if the I/O alternate function output is selected and I2C1 is clocked. TIM3_CH2 cannot be used in output mode.

Workaround

To avoid this conflict, TIM3_CH2 can only be used in input mode.

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