Normally on arduino, you can communicate with this device simply by doing something like this:
Wire.begin(0x79);
Wire.write(0x08);
//insert additional communication here
Wire.endTransmission()
However, when using the same code on STM32Duino this communication won't succeed.
First of all, 0xF2 (0x79 << 1) byte will appear twice on the bus (because we are configuring HAL's I2C interface in 7bit mode, however the MCU itself recognizes this address as the beginning of 10 bit address).
This is not possible as it is manage by hardware to follow I2C specification where:
11110xxx is reserved for 10-bit Slave Addressing.
Arduino does not support 10 bits addressing mode. The API is limited to an
uint8_t
address: https://github.com/arduino/ArduinoCore-API/blob/4a02bfc0a924e1fec34c3bb82ffd5dfba7643a0c/api/HardwareI2C.h#L31 https://github.com/arduino/ArduinoCore-API/blob/4a02bfc0a924e1fec34c3bb82ffd5dfba7643a0c/api/HardwareI2C.h#L36About the hack to use 10 bits on Arduino:
This is not possible as it is manage by hardware to follow I2C specification where:
11110xxx
is reserved for 10-bit Slave Addressing.Fixes #2468.