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.

BQ76930: Query in TI ref design TIDA-00449

Part Number: BQ76930
Other Parts Discussed in Thread: TIDA-00449,

Hello, 

In the source code provided by TI in TIDA-00449 resource following part is not clear why it is done, as I am unable to find any reference in available documentation for the waiting performed in code snippet below.

File: drv_bq76930.c

void BqInitialisebqMaximo(void)
{
    uint16_t count = 0;
    bqCoulomb      = 0;
    bqTotalCoulomb = 0;
    bqBalanceIndex = 0;
    bqI2CError = FALSE;

    //BQ76930 need 400ms from SHIP-to-NORMAL transition to first read operation, datasheet, page 21.
    //ALERT will be set in approx. 990ms after SHIP-to-NORMAL transition.
    //Stay here for the alert to be set.
    while(TRUE)
    {
        delay_1ms(1);
        count++;
        if(BqIsAlert() == TRUE)
        {
            break;
        }
        else
        {
            if(count >= 1000)
            {
                //MCU is powered but in 1s ALERT is not set....error
                break;
            }
        }
    }

it would be helpful if anyone can provide documentation reference for above waiting operation.

Thank you 

  • Hi Mandar,
    From the comments it seems they are allowing 1 sec for the part to be operational. It is not clear from this code segment how they are accomplishing this since it is the CC which would normally set the ALERT signal and that would happen at the first full 250 ms period after the CC_EN was synchronized to the internal scheduler.
    Note that with the reference to the data sheet and 400ms, the voltages can be read at any time but will not be meaningful until the part has completed the voltage collection and made the values available in the registers. Before data is available the registers will typically read 0.
    Implement a startup sequence appropriate for your design.