cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 TIM3 CH2 PWM grounded when I2C1 turned on

Bartosz Jurek
Associate
Posted on November 08, 2017 at 14:14

Hello

I have an issue with STM32F103C8T6

I have my project configuration in CubeMX like on the image below. TIM3 all 4 channels are set to PWM Mode 1.  I2C1 is set to standard mode. When I turn on PWM generation on all channels I have output only on ch1, ch3, ch4. On CH2 is still logic zero. But when I compile and run same project but without I2C, all PWMs are working correctly.

Do you know where the issue can be ?

When i move mouse over yellow I2C box I can see that there is conflict with TIM3 CH2 PWM generation, but I2c option is white not red and it's using other gpio pins so I don't know it's a problem and why it's not red in that fact.

In my code I use standard HAL_TIM_PWM_Start() function to start pwm's, and for now there isn't any code for I2C only HAL init function

0690X00000608stQAA.png

#tim3 #conflict #i2c #pwm #stm32f103c8
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
waclawek.jan
Super User
Posted on November 08, 2017 at 18:20

The 'F10x was a primordial line with limited combinations of output pins. Read the AFIO chapter in RM0008, concentrate on TIM3 and I2C1 and the conflicting pins which you neglected to tell us.

JW

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.