This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
As shown in the figure,SYS_CTRL1 register can be written correctly, but it cannot be read correctly. The data register can read the battery voltage normally. Therefore, whether the bit configuration register cannot be read or needs to be unprotected when reading.
You should be able to read from 0x04 with no problems. Do you have an EVM to test on? Have you looked at our example code for reference?
hello, im his colleague,i can describe this problem to you deeply.
we dont use TI CPU like msp430 but another chip.
This is our IIC transfomation function
rt_uint8_t BQ76920_ReadOneByte (rt_uint16_t ADDR) { rt_uint8_t temp = 0; BQI2C_Start (); BQI2C_SendByte (0x10); BQI2C_ReceiveAck (); BQI2C_SendByte (ADDR); BQI2C_ReceiveAck (); BQI2C_Start (); BQI2C_SendByte (0x11); BQI2C_ReceiveAck (); temp = BQI2C_ReceiveByte (); BQI2C_SendAck (1); BQI2C_Stop (); return temp; }
unsigned char BMS_sta, DSG_STA, CHG_STA, DSG_STA_FLAG, CHG_STA_FLAG; void BMS_STA (void) { BMS_sta = BQ76920_ReadOneByte (SYS_CTRL2); DSG_STA = BMS_sta & 0x02; CHG_STA = BMS_sta & 0x01; }
void BQ76920_WriteOneByte (rt_uint16_t ADDR, rt_uint16_t DataToWrite) { BQI2C_Start (); BQI2C_SendByte (0x10); BQI2C_ReceiveAck (); BQI2C_SendByte (ADDR); BQI2C_ReceiveAck (); BQI2C_SendByte (DataToWrite); BQI2C_ReceiveAck (); BQI2C_Stop (); rt_thread_mdelay (10); }
Are they sending CRC? This device requires CRC to communicate properly. The TI sample code should serve as an example for their own code, as it implements the CRC function in it.
CRC is not optional in this device when writing. You require CRC to write.
See Question 6.5 Can I use the CRC part without CRC? of the bq76920, bq76930, bq76940 AFE FAQ.
I would advice that you test using an EVM to ensure it all works properly. The sample code should function as an example to implement in your own code.