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.

PRE-DISCHARGE MOSFET MANUAL CONTROL

Part Number: BQ76952

Dear Engineering team at TI, here is the problem description.

We are trying to use the AFE (BQ7695202) in partial autonomous FET control mode to control the PRE-DISCHARGE (PDSG) MOSFET. As per the requirement, we are supposed to start the BMS with all the FETs disabled. Next, we check for the stack and load side voltages and control the turn ON of the PDSG based on the difference between the stack and load voltages (Delta). If the delta is greater than 2 Volts, we turn ON the PDSG for 2 seconds, turn it OFF after these 2 seconds are elapsed and again check for the delta. If the delta is lesser than 2 Volts, we can now proceed to turn ON the main discharge MOSFETS (DSG). In case the delta is still greater than 2 Volts, we wait for 1 minute before the PDSG is turned ON for 2 seconds and then repeat this cycle. The main DSG MOSFETs are not allowed to turn ON until and unless the delta is lower than 2 Volts. In implementing this logic, I have followed the instructions from the technical reference manual (TRM) and data sheet (DS) where it suggests that “FET_INIT_OFF” bit field must be set for host (MCU) controlled FET turn-ON as shown in Fig 1.


Fig 1. FET Control register (from page 168 of TRM)

Following these instructions, the FET options has been set to 0011 1101 (which translates to 0x3D in hexadecimal). The bit mappings are shown in Table 1.

 

Table 1. Bit field configuration for PDSG control used in the current firmware

Bit Number

7

6

5

4

3

2

1

0

Bit Field

RSVD_0

RSVD_1

FET_INIT_OFF

PDSG_EN

FET_CTRL_EN

HOST_FET_EN

SLEEPCHG

SFET

Binary

Value

0

0

1

1

1

1

0

1

Hex

Value

3

D

 

The same settings have been applied in the firmware as well and this is shown in Fig 2.


Fig 2. Applied settings for the FET control from the firmware shows 0x3D

 

The logical implementation in embedded C language has been shown.

              /* *************************************************************************************************************************************************************************************** */

                                         /* **************          * MANUAL CONTROL OF PRE-DISCHARGE MOSFET WITH LD PIN VOLATAGE AND CUSTOM TIMEOUT * **************        */

              /* *************************************************************************************************************************************************************************************** */

              if (INIT_MODE==1)

              { //Main IF

                     INIT_MODE=0;

                     for (int pd_ind=0; pd_ind<5; pd_ind++)

                     { //PD Count FOR

 

                           //Collect the data from the AFE

                           status = BMS_CollectData(&msg);

 

                           if (status != HAL_OK)

                           { // AFE Status IF

                                  APP_DEBUG("I2C Connection Lost\r\n");

 

                                  gBMSFault.bit.AFE = 0x01;

                                  HAL_GPIO_WritePin(GPIOA, LED1_Pin, GPIO_PIN_SET);

 

                           }

                           else

                           {

                                  gBMSFault.bit.AFE = 0x00;

                                  HAL_GPIO_WritePin(GPIOA, LED1_Pin, GPIO_PIN_RESET);

 

 

 

ThisBMS.Stack_Voltage   =*(uint16_t *) &msg. BatVoltsAndCurrent_t.batVoltsAndCurrent[0];

ThisBMS.LD_Voltage         =*(uint16_t *) &msg.BatVoltsAndCurrent_t.batVoltsAndCurrent[2];

 

 

                                  if (ThisBMS.Stack_Voltage - ThisBMS.LD_Voltage > 200 )

                                         { // LD Check IF

                                                //Turn ON PDSG-MOS for 1 second

                                                if(BQ769x2_PDSG_Enable() != AFE_OK)

                                                {

                                                       while(1);

                                                }

 

                                                       HAL_Delay(1000); //Wait for 1 second

                                               

                                                //Turn OFF PDSG-MOS after 1 second

                                                if(BQ769x2_PDSG_Disable() != AFE_OK)

                                                {

                                                       while(1);

                                                }

 

                                         }

                                         else

                                         {

                                                //Turn ON MAIN-MOS

                                                if(BQ769x2_DSG_Enable() != AFE_OK)

                                                {

                                                       while(1);

                                                }

 

                                                //Break out of the loop

                                                break;

                                         } //end LD Check IF

                                        

                                         //Wait for 1 minute

                                         for (int del_ind=0; del_ind<4; del_ind++)

                                         {

                                                HAL_Delay(1000);

                                         }

 

                           } //end AFE Status IF

 

                           if (pd_ind==4)

                           {

                                  //Disable the PDSG-MOS

                                  if(BQ769x2_PDSG_Disable() != AFE_OK)

                                  {

                                         while(1);

                                  }

                                  //Disable the MAIN-MOS

                                  if(BQ769x2_DSG_Disable() != AFE_OK)

                                  {

                                         while(1);

                                  }

                           }

                     } // end PD Count FOR

 

              } //end MAIN IF

 

 

However, the PDSG MOSFET is not turning ON as intended as we were not able to detect any gate pulse being sent from the AFE. The code has been de-bugged several times and the MCU is executing all these lines successfully.

The E2E forums hosted by TI mentions that the PDSG mosfets cannot be individually controlled as shown in  Fig 3. This is where we require assistance.

Fig 3. TI E2E forums discussing the pre-discharge capabilities.

We sincerely request your help and support in this regard.