How do I determine the memory address size parameter for HAL_I2C_Mem_Write/Read?
Hi, I am trying to establish I2C communication between my STM32 Nucleo 411RE and this EM7180 sensor fusion coprocessor using the HAL_I2C_Mem_Write()/Read() functions. However, I'm having trouble with the MemAddSize parameter.
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef * hi2c,uint16_t DevAddress,uint16_t MemAddress,uint16_t MemAddSize,uint8_t * pData,uint16_t Size,uint32_t Timeout )
I don't know how to figure out the size of each internal memory address in the EM7180. I wasn't able to find any information in the datasheet, and the Arduino code as well as other libraries I've found use I2C functions that doesn't require this parameter.
So far, I have assumed all of the MemAddress values to be "1". But in the Arduino example code, as many as 16 bytes are read from a single register in some cases. So this is probably wrong. My code is not working.
Would anyone be able to point me in the right direction?