Other Parts Discussed in Thread: BQ76952
Dear sir,
I am using M0C1104 (TSSOP20 package) for i2c communication. In CSS,I am facing issues in reading memory location using I2c with EEPROM(M24C08) and BQ76952.
I am able to read correct data on some memory locations but on other locations I am getting garbage data.
Tested I2C SCL clock is 100khz /400Khz for EEPROM and 400 KHz for BQ76952.
Function used
I2C_ReadReg(COMMAND, RX_Data, 2);
7 bit I2C_TARGET_ADDRESS = 0x50 ( for eeprom 0xA0 >>1) and 0x08 (for bQ76952 0x10 >> 1)
#include "BQ769x2_protocol.h" uint8_t RX_Data[4]; volatile uint8_t COMMAND = 0x0E; int main(void) { SYSCFG_DL_init(); DL_SYSCTL_disableSleepOnExit(); while (1) { I2C_ReadReg(COMMAND, RX_Data, 2); } }
Please help what might be the problem for I2C to not work properly.
please provide some sample code for I2C memory read and write with BQ76952
Thank you so much