Problem reading MAX17205 Fuel Gauge over I2C
- April 30, 2018
- 4 replies
- 3731 views
Hi,
I have a MAX17205 Fuel Gauge connected to an STM32373C-EVAL board over I2C. I'm trying to read the DEVNAME register on the MAX17205 as a communication test but am getting a NACK error. I've checked the I2C signals on a scope and taken a screen grab which is attached.
I've set the following parameters in the firmware as specified in the MAX17205 datasheet:
&sharpdefine MAX17205_ADDRESS 0x6C
&sharpdefine MAX17205_DEVNAME_REG 0x021And I'm right shifting the slave address before I call the I2C read function, as specified in the HAL I2C driver:
HAL_I2C_Mem_Read_DMA(&I2cHandle , (uint16_t)MAX17205_ADDRESS >> 1, (uint16_t)MAX17205_DEVNAME_REG, I2C_MEMADD_SIZE_16BIT, (uint8_t*)aRxBuffer, RXBUFFERSIZE);
I am using the I2C_EEPROM example from the STM32CubeF3 SDK and can successfully read from/write to the EEPROM on the STM32373C-EVAL board over the same I2C bus (I2C1) and same I2C pins (PA9/PA10). I've double checked the connections to the MAX17205 and they seem fine.
Anyone have any suggestions? Would appreciate your help.
Cheers,
Tony
#stm32f373-eval #read-i2c #max17205