2020-06-26 08:04 AM
SCL mode is Fast Mode but i.e whoes speed is 400KHz. but when i see in logic analyzer its shows 350-360KHz. Why its fluctute .
2020-06-26 11:45 PM
Two possible reasons:
The clock rate is too fast for the peripheral, and it is using clock stretching to slow it down. Check its datasheet to see whether it is supposed to do that.
System clock setup code is broken in certain STM32CubeMX and HAL versions. There are various analyses and workarounds suggested in the forum, I have ended up writing my replacement according to the documentation in the reference manual. The failure mode was similar in my case, a clock which was supposed to be 100 MHz sometimes dropped to 90 MHz. Check the SystemInit() function as well, it too might be broken in later versions.
2020-06-27 12:00 AM
2020-06-27 12:23 AM
Then it is time to get familiar with the RCC chapter of the reference manual.