cancel
Showing results for 
Search instead for 
Did you mean: 

I2C on bluepill STM32F103C8T6

kick
Associate II

configured in cube MX. PB6 / PB7 in I2C at 50K

i added 4,6K pullup at 3,3V

i try to connect ADS1115 (work's in other board)

the driver HAL return BUSY.

in scope,no have edge down.

wait flag reset...

have you an idea?

thanks

4 REPLIES 4

Try to bit-bang the I2C.

JW

kick
Associate II

i have in project a strange thing,the projet empty with I2C works...

if i just change APB2 Prescaler 1 to 16 (for my projet) I2C1 don't work.

i don't understand because I2C1 is on APB1 in datasheet..

i tested this one hundred times.

do you have an explanation?

thnaks

kick
Associate II

when i use APB2 Prescaler /16 I2C don't work, at the beginning i think is when APB2 clock is next to 0MHz but in fact is when i you APB2 PRescaler /16. register CFG is correctly, no change of APB1 PRescaler.

Interesting, and I have no idea what may be wrong.

GPIOs and AFIO are on APB2 in the 'F1 - can't this be related somehow? Read back and check the related GPIO and AFIO registers.

Have you tried different APB2 prescalers?

What happens if you set *both* APB1 and APB2 prescaler to the same value?

Isn't there anything related in the errata?

I don't use the 'F1.

JW