Go Down

Topic: I2C arduino with stm32 ack failure (Read 387 times) previous topic - next topic

semz

I'm using arduino as master receiver and stm32f103 as slave transmitter.

After data of 4 bytes transferred correctly and displayed on arduino serial the stm enters err interrupt as acknowledge failure detected.

My guess is that the stm waits for ack after each byte. After the last byte stm waits for ack then stop but arduino sends stop only without ack.

Is that guess right or not ? And how to solve this issue ?   

Koepel

Hi, that is very little information.
Can you show a screendump of a logic analyzer en give a link to how the STM32 in Slave mode behaves ?

When the Master requests data from the Slave, the Slave does a ACK to its I2C address. After that, the Master gives the CLK signal and the ACK after each read databyte.

That ACK from the Master is to tell the Slave that it should prepare a new databyte.
After the last databyte is read, the Master does not give a ACK, but a STOP.

That is according to the I2C standard. You should not change that.

Go Up