Open
Description
I see a punch through issue wrt successive .DR.DR writes for a 16bit mem addr.
In stm32-i2c.adb:621 adding this wait after the end case seems to clean up the issue. Should be benign for 8bit mem addr also. I have not looked at the other 16bit handlers but I assume they will also need this treatment. Certainly read needs it. My sensor is an ST VL6180X Range and ALS sensor. It uses 16bit addresses. On the logic analyzer I do see the address being stepped on by the following read command thereby culling the DR of the LSB for the parts mem addr.
Wait_Flag (This, Tx_Data_Register_Empty, False, Timeout, Status);
if Status /= HAL.I2C.Ok then
return;
end if;
-- We now need to reset and send the slave address in read mode
This.Periph.CR1.START := True;
Wait_Flag (This, Start_Bit, False, Timeout, Status);