Tool/software: Code Composer Studio
I choose
Registers.OVTrip = (unsigned char)((((unsigned short)((OVPThreshold - Registers.ADCOffset)/Gain + 0.5) - OV_THRESH_BASE) >> 4) & 0xFF);
Registers.UVTrip = (unsigned char)((((unsigned short)((UVPThreshold - Registers.ADCOffset)/Gain + 0.5) - UV_THRESH_BASE) >> 4) & 0xFF);
The actual voltage of my battery 4 series is (bit 4 short): VC[0]= 3270 mv VC[1]= 3272 mv VC[2]= 3276 mv VC[3]= 46 mv VC[4]= 3268 mv
I set the OV Threshold to 3700 and the UV Threshold to 3500, and found that there was no action on the chip and the UV of SysStatus was not set.
I set the OV Threshold to 2,700 and the UV Threshold to 2,500. I found that there was no activity in the chip, and the OV of SysStatus would not be set.
Why??
Below is the initialization value of register BQ76920. See if there is anything wrong.
/****SYS_STAT=0x0****/
/****CELLBAL1=0x0****/
/****SYS_CTRL1=0x90****/
/****SYS_CTRL2=0x40****/
/****PROTECT1=0xa****/
/****PROTECT2=0x51****/
/****PROTECT3=0x90****/
/****OV_TRIP=0xb7****/
/****UV_TRIP=0x86****/
/****CC_CFG=0x19****/
Another problem is that when I use MCU to operate DSG, if there is no added delay, it is often impossible to set the DSG of SYS_CTRL2 to 1.
Often is to write 1 go in, read again, discover still 0. Added delay to go in later, normal. Trouble helps look, thank!
void OperateDSG(unsigned char _DSG)
{
while(BQ_ReadRegisterByte(SYS_CTRL2, &(Registers.SysCtrl2.SysCtrl2Byte)));
if(Registers.SysCtrl2.SysCtrl2Bit.DSG_ON != _DSG)
{
DelayMs(3);
Registers.SysCtrl2.SysCtrl2Bit.DSG_ON=_DSG;
DelayMs(3);
while(BQ_WriteRegisterByte(SYS_CTRL2,Registers.SysCtrl2.SysCtrl2Byte));
}
}