2024-09-03 05:27 PM
Im using the stm32f407 discovery to run I2C in fastmode (400kHz), using the equation given in the datasheet, I choose the system clock to be 120Mhz, so I have 30Mhz pclk for I2C. duty cycle T_low/T_high = 2, so CCR is 25d, T_rise is 300ns so that would result in 10d. But the clock doesn't be 400kHz, it keep changing at 333kHz or 500kHz. sorry for my bad english, appreciate for any help.
Solved! Go to Solution.
2024-09-03 06:10 PM
Increase your logic analyzer sampling rate. It appears to be 1 Msps which is not enough to get the resolution you want. This is an artifact of the logic analyzer, not an STM32 problem.
2024-09-03 05:59 PM
If you are using CubeMX or STM32CubeIDE, attach your IOC file
2024-09-03 06:10 PM
Increase your logic analyzer sampling rate. It appears to be 1 Msps which is not enough to get the resolution you want. This is an artifact of the logic analyzer, not an STM32 problem.
2024-09-03 11:45 PM
Thanks so much, after changing the sampling rate, the SCL show perfect 400kHz. Hope you all have a great day