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.

[参考译文] BQ27411-G1:IC 未检测电池

Guru**** 1131400 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1234788/bq27411-g1-battery-not-detecting-by-ic

器件型号:BQ27411-G1

/*
Change Design Capacity to 2200mAh
*/


I2C Write 0x8000 to 0x00	        //UNSEAL it by sending 0x8000 to Control() (0x00 and 0x01) twice
I2C Write 0x8000 to 0x00
I2C Write 0x0013 to 0x00	        //Send SET_CFGUPDATE subcommand, Control(0x0013)
I2C Read 0x06               		//Confirm CFGUPDATE mode by polling Flags() register until bit 4 is set
I2C Write 0x00 to 0x61			    //Write 0x00 using BlockDataControl() command (0x61) to enable block data memory control
I2C Write 0x52 to 0x3E		        //Write 0x52 using the DataBlockClass() command (0x3E) to access the State subclass (82 decimal, 0x52 hex) containing the Design Capacity parameter
I2C Write 0x00 to 0x3F			    //Write the block offset location using DataBlock() command (0x3F).
                                    //Note: To access data located at offset 0 to 31, use offset = 0x00. To access data located at offset 32 to 41, use offset = 0x01.
I2C Read 0x60               		//Read the 1-byte checksum using the BlockDataChecksum() command (0x60) (Obtained checksum = 0x12)
I2C Read 0x4A               		//Read both Design Capacity bytes starting at 0x4A (offset = 10). Block data starts at 0x40, so to read the data of a specific offset, use address 0x40 + mod(offset, 32).
I2C Read 0x4B
I2C Write 0x08 to 0x4A  			//Write both Design Capacity bytes starting at 0x4A (offset = 10). the new value is 2200 mAh. (0x0898 hex)
I2C Write 0x98 to 0x4B
I2C Write 0x72 to 0x60  			//Write New Checksum (0x72 by checksum calculation as mentioned in technical reference)
I2C Write 0x0042 to 0x00        	//Soft Reset to exit CFGUPDATE Mode
I2C Read 0x06               		//Confirm CFGUPDATE has been exited by polling Flags() register until bit 4 is cleared. 
I2C Write 0x0020 to 0x00        	//Return to SEALED mode
/*
Change clear the OpConfig[BIE] to 0
*/


I2C Write 0x8000 to 0x00	        //UNSEAL it by sending 0x8000 to Control() (0x00 and 0x01) twice
I2C Write 0x8000 to 0x00
I2C Write 0x0013 to 0x00	        //Send SET_CFGUPDATE subcommand, Control(0x0013)
I2C Read 0x06               		//Confirm CFGUPDATE mode by polling Flags() register until bit 4 is set
I2C Write 0x00 to 0x61			    //Write 0x00 using BlockDataControl() command (0x61) to enable block data memory control
I2C Write 0x40 to 0x3E		        //Write 0x52 using the DataBlockClass() command (0x3E) to access the State subclass (64 decimal, 0x40 hex) containing the OpConfig parameter
I2C Write 0x00 to 0x3F			    //Write the block offset location using DataBlock() command (0x3F).
                                    //Note: To access data located at offset 0 to 31, use offset = 0x00. To access data located at offset 32 to 41, use offset = 0x01.
I2C Read 0x60               		//Read the 1-byte checksum using the BlockDataChecksum() command (0x60) (Obtained checksum = 0x5E)
I2C Read 0x40               		//Read both Design Capacity bytes starting at 0x40 (offset = 00). Block data starts at 0x40, so to read the data of a specific offset, use address 0x40 + mod(offset, 32).
I2C Read 0x41
I2C Write 0x05 to 0x4A  			//Write both Design Capacity bytes starting at 0x4A (offset = 10). the new value is 2200 mAh. (0x05F8 hex)
I2C Write 0xF8 to 0x4B
I2C Write 0x61 to 0x60  			//Write New Checksum (0x61 by checksum calculation as mentioned in technical reference)
I2C Write 0x0042 to 0x00        	//Soft Reset to exit CFGUPDATE Mode
I2C Read 0x06               		//Confirm CFGUPDATE has been exited by polling Flags() register until bit 4 is cleared. 
I2C Write 0x0020 to 0x00        	//Return to SEALED mode

嗨、朋友们!

我尝试使用 BQ27411-G1A 捕获锂离子电池的电压、电流和充电状态(SOC)。 我能够读取电压、电流和功率、但我得到的 SOC 值是错误的。 我有时会获得100%的 SOC 值、有时会获得0%。

通过读取标志寄存器(0x06-0x07)、我发现 IC 无法检测电池、且标志[BAT_DET]始终为0。 然后、我尝试重新配置 OpConfig 寄存器(0x3A-0x3B)、以将 OpConfig[BIE]引脚更改为0、以便我可以在电池插入时手动为 IC 提供输入。 以下是我为此采取的步骤。

  • 使用直流适配器在不使用电池的情况下为电路板供电。
  • 将"设计容量"值更改为2200mAh (我使用3.7V、2200mAh、锂离子18650圆柱形电池)。 附加了伪代码。
  • 将"OpConfig"寄存器值更改为0x05F8、从而将 OpConfig[BIE]清零。 执行此步骤可以禁用[BIE]位并从主机手动进入电池插入模式。 附加了伪代码。
  • 插入电池。
  •   由于 OpConfig [BIE]位为0、使用控制寄存器(0x0000)写入了 BAT_INSERT 子命令(0x000C)以强制设置 Flags ()[BAT_DET]位。
    "I2C 写入0x000C 至0x00"

我尝试读取 SOC 寄存器(0x1C-0x1D)、但我得到的值是0x00、标志位[BAT_SET]始终会清零。 但电压、电流和功率值是正确的。

过程中是否漏掉了任何东西? 或逻辑/代码有任何问题?

感谢任何帮助。

-提前感谢

哈里

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Hari、

    在您写入 BAT_INSERT ()之后,是否设置了 BAT_DET ?