Hi
I noticed a conflict on my STM32F103 board when I was using PB_5 as a PWM concurrently with I2C1.
If I don't instantiate I2C1, the PWM output on PB_5 works great. As soon as I instantiate I2C1, the PWM on this output dies.
I do see that PB_5 has an alternate function of "I2C_SMBAI" which makes me suspicious that this is the source of the problem. I do notice a footnote on the datasheet from ST that states:
"If several peripherals share the same I/O pin, to avoid conflict between these alternate functions only one peripheral should
be enabled at a time through the peripheral clock enable bit (in the corresponding RCC peripheral clock enable register)."
I was hoping that there was a way to ignore SMBAI and use PB_5 as a PWM output channel.
Has anyone else encountered this issue? Any thoughts this problem being a conflict with the alternate function?
I do notice I can declare PB_5 as a GPIO (DigitalOut) and it works correctly with PWM.
Thanks
Bill
<EDIT>
I have tracked it down to the conflict on the resource. I forced the I2C clock off during the test via the RCC_APB1ENR register and the PWM came back to life on the pin
Hi I noticed a conflict on my STM32F103 board when I was using PB_5 as a PWM concurrently with I2C1. If I don't instantiate I2C1, the PWM output on PB_5 works great. As soon as I instantiate I2C1, the PWM on this output dies.
I do see that PB_5 has an alternate function of "I2C_SMBAI" which makes me suspicious that this is the source of the problem. I do notice a footnote on the datasheet from ST that states:
"If several peripherals share the same I/O pin, to avoid conflict between these alternate functions only one peripheral should be enabled at a time through the peripheral clock enable bit (in the corresponding RCC peripheral clock enable register)."
I was hoping that there was a way to ignore SMBAI and use PB_5 as a PWM output channel.
Has anyone else encountered this issue? Any thoughts this problem being a conflict with the alternate function? I do notice I can declare PB_5 as a GPIO (DigitalOut) and it works correctly with PWM.
Thanks Bill
<EDIT> I have tracked it down to the conflict on the resource. I forced the I2C clock off during the test via the RCC_APB1ENR register and the PWM came back to life on the pin