Other Parts Discussed in Thread: BQ34Z100
Hello,
I have a tm4c1230e6pm who read a bq34z100-z1 gauge. when I have a big current disappearing, I can no longer communicate with the gauge. I have the signals below. I try to reset the I2C with this code: uint32_t
uint32_t u32_status; u32_I2cPort = I2C1_BASE; u32_status = HWREG(u32_I2cPort + I2C_O_MCS); I2CMasterDisable(u32_I2cPort); I2CMasterIntClear(u32_I2cPort); I2CMasterIntDisable(u32_I2cPort); HWREG(u32_I2cPort + I2C_O_FIFOCTL) = 80008000; I2CMasterDisable(u32_I2cPort); SysCtlPeripheralDisable(SYSCTL_PERIPH_I2C1); HWREG(u32_I2cPort + I2C_O_FIFOCTL) = 80008000; SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C1); I2CMasterInitExpClk(u32_I2cPort, SysCtlClockGet(), true); I2CMasterTimeoutSet(u32_I2cPort,50); I2CMasterGlitchFilterConfigSet(u32_I2cPort,I2C_MASTER_GLITCH_FILTER_16); //clear I2C FIFOs HWREG(u32_I2cPort + I2C_O_FIFOCTL) = 80008000; I2CMasterEnable(u32_I2cPort);
But The I2c doesn't work. I measure these signals on the i2c
the red is the clock and the blue is the data. how to reset the I2C?
Thanks
Best Regards,
M.Micou