2014-07-10 02:41 AM
Hello,
i tried to use I2C3 on PA8 and PC9. I noticed that i can send data over the i2c bus but the stop condition was not working. So the bus never came back. After some investigation i found that the SCL line starts oscillating with 16MHz (I use the HSI oscillator). I checked the RCC MCO settings and noticed that it is set to HSI output. When i change the prescaler i can change the frequency. Since i use a STM32F407VGT6 i am not able to use alternative pins. Is there any workaround to avoid MCO to overtake the I2C lines? #stm32f407 #mco #i2c2014-07-10 03:28 AM
> After some investigation i found that the SCL line starts oscillating with 16MHz
Under what circumstances does this happen? What is the content of GPIOA_AFRH in that moment? JW2014-07-11 04:36 AM
Finally i got it working. The Problem was that i did the usb init after i2c init.
The usb init caused the pin mode change. After changing the init order everything works fine.2014-07-11 05:37 AM
> The usb init caused the pin mode change.
Why would USB init set MCO output? Is the USB init your code or some library? JW