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.

BQ27742EVM: BQ27742-G1

Part Number: BQ27742EVM
Other Parts Discussed in Thread: EV2400, GPCCHEM

Hi,

I'm currently able to write design density data into flash of BQ27742 . But when I read it, using 0x3c I'm finding the default value only. My updated data is not shown. How to update flash with my new data.

Thanks in advance,

Kavya.

  • Hello Kavya,

    Can you share your command sequence for updating the design capacity?

    If you have a logic analyzer or scope I would recommend updating the value with the EV2400 (which is needed anyway to update the chemistry ID) and checking the communication sequence.

    Sincerely,

    Wyatt Keller

  • Hello Keller,

    Thanks for replying. The command sequence I'm sending for updating design capacity is,


    // Unseal gauge
    unseal(); // writing default 0x36720414 key in key0 and key1 for unsealing.

    // Enable Block Data Memory Control
    blockDataControl(); //write 0x00 to 0x61 command
    DelayMS(5); //5ms delay
    // Access State subclass
    blockDataClass(48); // issue 0x3e command to set data class 48 to be accessed.
    // Write the block offset
    blockDataOffset(0 / 32); // issue 0x3f command to set data block to access. 
    // Read block checksum
    computeBlockChecksum(); // Read all 32 bytes of the loaded extended data and compute a checksum based on the values.
    uint8_t oldCsum = blockDataChecksum(); // Read the current checksum using 0x60 command.
    uint8_t block[32];
    //Update Design Voltage
    block[0] = (uint8_t)( designVoltage >> 8 );
    block[1] = (uint8_t)( designVoltage & 0x00FF );
    // Update design capacity
    block[10] = (uint8_t)( designCapacity_mAh >> 8 );
    block[11] = (uint8_t)( designCapacity_mAh & 0x00FF );
    // Write data bytes:
    for (i = 0; i < 32; i++)
    {
    // Write to offset, mod 32 if offset is greater than 32
    // The blockDataOffset above sets the 32-bit block
    writeBlockData((0 % 32)+i , block[i]);
    }

    // Write new checksum using BlockDataChecksum (0x60)
    uint8_t newCsum = computeBlockChecksum(); // Compute the new checksum
    writeBlockChecksum(newCsum);
    DelayMS(3000);
    control_write( BQ27742_GAUGE_RESET ); write 0x0041 command to reset the gauge.
    DelayMS(500);
    seal(); //write 0x0020 to seal the gauge.

    And I have few doubts like,

    1. whether EV2400 is definitely required for flash update or can be done using command sequence. 

    2. Why Chem ID is needed when read commands are working fine.

  • Hello Kavya,

    Can you compare the logic analyzer capture of the EV2400 communication and of your hosts communication. This will most likely show you where any of the issues are, it is very common for there to be issues in the sequence or the drivers used, which is difficult to debug from our side.

    The EV2400 is require for accurate gauging, unless after getting results from GPCCHEM the chem ID is the same as the default loaded in the flash memory. The only gauges that do not require EV2400 for setup are ROM gauges, in which case you order the gauge with the best matching voltage range for the chem ID.

    Sincerely,

    Wyatt Keller

  • Hello Wyatt,

    I don't have EV2400 with me. I'm trying to dump with microcontroller only. Does I need EV2400 definitely for this debugging. I'm not doing anything with chem ID currently, but when I measure voltage the reading is accurate only. Does that mean, no need of changing chem ID.

    Thanks in advance,

    Kavya. 

  • Hello Kavya,

    As I mentioned above, you must either have a match with the default chem ID using the GPCCHEM tool, or you must use the EV2400 to program the chem ID the tool recommends to you. You are using a flash based gauge, if you were using a ROM gauge the EV2400 is not required since it comes pre-loaded with one of 3 chem IDs you can order.

    Just because the voltage reading is correct does not mean the gauging results will be accurate. Our Impedance Track gauge model requires the proper chem ID for gauging accuracy. You will need an EV2400, and it does also speed up debugging.

    Sincerely,

    Wyatt Keller