cancel
Showing results for 
Search instead for 
Did you mean: 

i2c on fast mode hangs on stm32f103cb

gvuyk07
Associate II
Posted on March 15, 2016 at 02:35

When reading data from an MPU6050 on standard mode (100khz) everything goes well, but when switching to fast mode 400khz the program just hangs, debugger shows an infinite loop on line 3935 of stm32f1xx_hal_i2c.c

 

 

Attached screenshot from that part of the code and my clock config on CubeMX in case that's relevant

0690X00000605N9QAI.png

0690X00000605KGQAY.png

Is there something else to be done?

0690X00000605MqQAI.png

Notes:

By switching I mean changing the setting on CubeMX and recompiling

I'm using the default 'blocking' i2c functions supplied by the hal driver (not interrupt based, not dma, those aint working for me either u.u but first things first)

Cube version: 4.13.0

1 REPLY 1
gvuyk07
Associate II
Posted on March 15, 2016 at 19:31

Just noted if read 6 bytes only, at 290khz, there's no problem at all!