AnsweredAssumed Answered

STM32F103C8 TIM3 CH2 PWM grounded when I2C1 turned on

Question asked by Bartosz Jurek on Nov 8, 2017


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