I'm currently encountering problems when reading more than 3 bytes (16 in my case) from an I2C node.
I'm having the I2C_SUPPORTS_CALLBACKS set to false, therefore my code uses the i2c_lld_master_receive on line 985 of i2c_lld.c
After reading 15 bytes, it gets stuck at the
Code: Select all
while (i2cp->id_i2c->CR1 & I2C_CR1_STOP)
;loop.
And it never never never exits that loop. When I logic analyse the data, it looks like this:

The statemachine at that moment looks like this
Code: Select all
i2cp 0x20001950
id_state I2C_ACTIVE_TRANSMIT
id_mutex {...}
id_config 0x080096d0
id_slave_config 0x080096e0
txbytes 0
rxbytes 1
rxbuf 0x200013e8 ==> "EMBRIONIX "
txbuf 0x200013f8
rxbuff_p 0x00000000
txbuff_p 0x00000000
errors 0
flags 0
slave_addr 80
slave_addr1 161
slave_addr2 0
sevent {...}
id_i2c 0x40005800I use the I2C2 with STM32_I2C_I2C2_USE_POLLING_WAIT set to true.
Is this a bug or am I using the implementation wrong?