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.

BQ79600-Q1: BMS FAULT STATUS TO BRIDGE DEVICE

Part Number: BQ79600-Q1
Other Parts Discussed in Thread: BQ79616, TMS570LS1224, BQ79616-Q1

Hi all,

I have a question that if there is a fault in our stack device then how will my base device know that there is a fault in the stack device?

According to datasheet there is two method

• Host ignores NFAULT pin, constantly polls the FAULT_SUMMARY register of each device. If FAULT_SUMMARY is non-zero, read the low level fault status registers to obtain more information.

• Host monitors NFAULT pin status. Enable fault status to pass down the daisy chain to bridge device. Enable bridge device’s NFAULT pin to be asserted when the FAULT_SUMMARY is non-zero. When NFAULT is triggered, host poll's fault information to diagnose further

I understand Method 1 but I have doubts about Method 2 that how to Enable fault status to pass down the daisy chain to bridge device and how to set active low NFAULT PIN according to fault status.

Thanks

  • Sudhir,

    The exact details of the second method is dependent on the device you are using as your stack devices. In the BQ79616, for example, you need to set DEV_CONF[FCOMM_EN] to 1 and the NFAULT signal will be propagated automatically down the daisy chain using COML/H. Then, you just need to monitor the NFAULT pin of the BQ79600 communication bridge.

    Regards,

    Ben

  • Hi Benjamin,

    If I leave NFAULT PIN as a floating in the stack device, does my stack device transmit a fault signal to the base device when I set  DEV_CONF[FCOMM_EN] to 1

    (2) NFAULT signal will be propagated automatically down the daisy chain using COML/H, does NFAULT pin of bridge device is automatically low in response of NFAULT signal.

    Thanks

  • Sudhir,

    1) You can leave the NFAULT pin floating in the stack devices if you use DEV_CONF[FCOMM_EN] = 1. The NFAULT signal is embedded in the communication frames, as detailed by section 9.3.6.2.3.1 of the datasheet.

    2) Yes. This method of propagating NFAULT sets FAULT_COMM1[FCOMM_DET] in the BQ79600. This will trigger NFAULT to be low provided that it is enabled with DEV_CONF1[NFAULT_EN].

    Regards,

    Ben

  • Hi Benjamin,

    When I enable TSREF than auto addressing not work properly 

    Below snap is the DIR0_ADDR value of 4 stack device and 1 base device after enable TSREF

    Below snap is the DIR0_ADDR value of 4 stack device and 1 base device when TSREF is disable.

  • Sudhir,

    You should do auto-addressing before you start writing to registers such as CONTROL2[TSREF_EN]. Do note that you must wait 1.35 ms after setting TSREF before sending another command.

    If you have another unrelated question, please create a new thread. It makes it easier to find if anyone else has the same question.

    Regards,

    Ben

  • Hi Benjamin,

    Thanks for reply and I was on vacation so I couldn't reply to you.

     I did everything you suggested but the problem is not solved as I turn on the TSREF than i facing the same problem as earlier 

    Auto addressing not work properly

    Below snap is the DIR0_ADDR value of 4 stack device and 1 base device after enable TSREF

    Below snap is the DIR0_ADDR value of 4 stack device and 1 base device when TSREF is disable.

    Below is my code

    /* USER CODE BEGIN (2) */
    int UART_RX_RDY = 0;
    int RTI_TIMEOUT = 0;
    /* USER CODE END */
    BYTE ADRESS[8];
    BYTE ADRESS1[8];
    BYTE ADRESS2[8];
    BYTE ADRESS3[8];
    BYTE ADRESS4[8];
    int main(void)
    {
    /* USER CODE BEGIN (3) */

    //INITIALIZE TMS570LS1224
    systemInit();
    gioInit();
    sciInit();
    rtiInit();
    sciSetBaudrate(sciREG, 1000000);
    vimInit();
    _enable_IRQ();
    gioSetDirection(hetPORT1, 0x00000000);


    //VARIABLES
    BYTE response_frame[(128+6)*TOTALBOARDS]; //store 128 bytes + 6 header bytes for each board
    BYTE status[(128+6)*TOTALBOARDS];
    BYTE response_frame3[(128+6)*gpio_adc];
    printf("\n\n\nBeginning Program\n");

    //INITIALIZE 600
    //two wakes in case the MCU had nCS and MOSI = 0 at start (which would put the device in shutdown) or in case the device was previously put in shutdown through a shutdown ping
    Wake79600(); //send wake ping to bridge device
    delayus(3500); //wait tSU(WAKE_SHUT), at least 3.5ms
    Wake79600(); //send wake ping to bridge device
    delayus(3500); //wait tSU(WAKE_SHUT), at least 3.5ms

    //INITIALIZE BQ79616-Q1 STACK
    WriteReg(0, CONTROL1, 0x20, 1, FRMWRT_SGL_W); //send wake tone to stack devices
    delayms(11.6*TOTALBOARDS); //wake tone duration is ~1.6ms per board + 10ms per board for each device to wake up from shutdown = 11.6ms per 616 board


    //AUTO-ADDRESS
    AutoAddress(); //auto address sequence

    //RESET ANY COMM FAULT CONDITIONS FROM STARTUP
    WriteReg(0, FAULT_RST1, 0xFF, 1, FRMWRT_STK_W); //Reset faults on stacked devices
    WriteReg(0, FAULT_RST2, 0xFF, 1, FRMWRT_STK_W); //Reset faults on stacked devices
    WriteReg(0, Bridge_FAULT_RST, 0x22, 1, FRMWRT_SGL_W); //Reset FAULT_COMM and FAULT_SYS on bridge device


    WriteReg(4,CONTROL2,0X01,1, FRMWRT_SGL_W); //tsref enable
    delayus(10000);
    // WriteReg(0,CONTROL2,0X01,1,FRMWRT_STK_W);
    // delayus(1500);
    //ENABLE BQ79616-Q1 MAIN ADC
    // WriteReg(0, GPIO_CONF2, 0x012, 1, FRMWRT_STK_W);
    // WriteReg(0, ACTIVE_CELL, 0x0A, 1, FRMWRT_STK_W); //set all cells to active
    // WriteReg(0, ADC_CTRL1, 0x06, 1, FRMWRT_STK_W); //continuous run and MAIN_GO
    // delayus(5*TOTALBOARDS + 192); //5us reclocking per board and 192us for round robin to complete

    //LOOP VARIABLES
    int channel = 0; //iterators
    int currentBoard = 0;

    do
    {
    channel = 0;
    currentBoard = 0;
    delayus(192+5*TOTALBOARDS);
    ReadReg(0, VCELL16_HI+(16-ACTIVECHANNELS)*2, response_frame, ACTIVECHANNELS*2, 0, FRMWRT_STK_R);
    ReadReg(0, /*AUX_GPIO_HI*/GPIO4_HI, response_frame3, 2, 0, FRMWRT_STK_R);

    // ReadReg(0,DEV_STAT,status,1,0,FRMWRT_STK_R);
    ReadReg(0, DIR0_ADDR, ADRESS, 1, 0, FRMWRT_SGL_R);
    ReadReg(1, DIR0_ADDR, ADRESS1, 1, 0, FRMWRT_SGL_R);
    ReadReg(2, DIR0_ADDR, ADRESS2, 1, 0, FRMWRT_SGL_R);
    ReadReg(3, DIR0_ADDR, ADRESS3, 1, 0, FRMWRT_SGL_R);
    ReadReg(4,DIR0_ADDR, ADRESS4, 1, 0, FRMWRT_SGL_R);
    /*
    * ***********************************************
    * NOTE: SOME COMPUTERS HAVE ISSUES RECEIVING
    * A LARGE AMOUNT OF DATA VIA printf STATEMENTS.
    * THE FOLLOWING PRINTOUT OF THE RESPONSE DATA
    * IS NOT GUARANTEED TO WORK ON ALL SYSTEMS.
    * ***********************************************
    */

    // printf("\n"); //start with a newline to add some extra spacing between each loop
    //only read/print the base device's data if there is no bridge device
    for(currentBoard=0; currentBoard<( BRIDGEDEVICE==1 ? TOTALBOARDS-1 : TOTALBOARDS); currentBoard++)
    {
    printConsole("1st DEVICE ADRESS --%d\n", ADRESS[4]); // bridge device

    printConsole("2nd device ADRES--%d\n", ADRESS1[4]);
    printConsole("3RD DEVICE ADRESS--%d\n", ADRESS2[4]);

    //
    printConsole("4TH DEVICE ADRESS---%d\n", ADRESS3[4]);

    printConsole("5TH DEVICE ADRESS---%d\n", ADRESS4[4]);

    printf("BOARD %d:\t",TOTALBOARDS-currentBoard-1);
    //print the data from each active channel (2 bytes each channel)
    for(channel=0; channel<(gpio_adc*2); channel+=2)
    {
    int boardByteStart = (gpio_adc*2+6)*currentBoard;
    uint16 rawData = (response_frame3[boardByteStart+channel+4] << 8) | response_frame[boardByteStart+channel+5];
    float rawData3 = rawData*0.00015259; //rawData*VLSB_ADC
    uint16 rawData2 = (status[4] ) ;

    printConsole("%f\t\n", rawData3 );
    // printConsole("%d\t\n",rawData2);
    printf("\n\r");
    delayus(10000000000);
    // printf("%f\t", cellVoltage);
    }
    printf("\n"); //newline per board
    }
    }while(1);

    /* USER CODE END */

    return 0;
    }


    /* USER CODE BEGIN (4) */
    /* USER CODE END */

    Thanks

  • Sudhir,

    When you do the reads for the device addresses, are you getting valid responses, which would indicate the device somehow getting reset, or just getting all zeroes, which would indicate that communication has failed? You could check this with a logic analyzer or by printing out the entire response frame.

    Regards,

    Ben

  • Sudhir,

    When you do the reads for the device addresses, are you getting valid responses, which would indicate the device somehow getting reset, or just getting all zeroes, which would indicate that communication has failed? You could check this with a logic analyzer or by printing out the entire response frame.

    Regards,

    Ben