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.

CCS/BQ76920: Code debugging

Part Number: BQ76920

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));
     }
}

 

 

 

  • Hi User,
    When programming with physical systems things take time to occur. Select or use a reasonable delay time.
    If you are setting OV below your battery voltage it will take the OV delay before status will change, 1 s is default, please check the register, you have 8 sec and 2 sec selections if I read correctly.
    Also the maximum UV value will be FF and give a UV of about 3V. The minimum OV is 00 and will give a voltage of about 3V. Please see the datasheet and check calculations.
    The initialize settings of OV at B7 will give a OV of approximately 4.2V. The UV of 86 will give about 2.3V for UV. So cells in the 3.2V range will not trigger a fault.