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.

BQ76952: trouble reading/writing to Data Memory

Part Number: BQ76952

We have a board which interfaces a microcontroller with the BQ76952 over
I2C. We can successfully utilize the direct command and subcommand
functionalities, and can therefore see in the Battery Status register
that we're successfully initializing the IC, that the chip is in
FULLACCESS mode & CFGUPDATE mode. Based on the Technical Reference and
the MSP430 Example code, we're trying to init the prereg, and both REG1
and REG2; but it doesn't seem to be working. If we've interpreted the
resources correctly, the below timing diagram is correct:

(enabling preregulator)


However, the regulators don't seem to be working, and when trying to
read back the REG12 Config and REG0 Config, we're getting 0xff, which
seems it may be a failure to read.

  • Hi Eohan,

    Section 3 of the BQ76952 Software Development Guide has some good example waveforms for reading and writing to RAM. The waveform you show looks correct for enabling REG0. After writing to the RAM register, you may need to wait 1 or 2 ms before reading it back or you might read 0xFF - have you tried adding some wait time? The TRM recommends reading back from 0x3E to see if the subcommand has finished execution:

    "3. Read 0x3E and 0x3F. If this returns 0xFF, this indicates the subcommand has not completed operation yet. When the subcommand has completed, the readback will return what was originally written. Continue reading 0x3E and 0x3F until it returns what was written originally. Note: this response only applies to subcommands that return data to be read back."


    There should also be wait time between RAM register writes - try starting with 2ms. Make sure to measure the REG1 and REG2 outputs directly to see if they are turning on.

    It would also be good to verify that you have the final version of the device and not a pre-production version. If you read the firmware version from the device (using Subcommand 0x0002), you should see the version is 0036 for the final production version. The register addresses did change between the pre-production and final versions.

    Best regards,

    Matt

  • We've checked that the firmware version is 36, and added a short delay between writing and reading data memory. However, we're still having trouble writing to the data memory and bringing up the Prereg and regulators.

  • That's good that you confirmed the firmware version. Do you have an EVM for this device? Maybe you can try going through these steps on the EVM so you can compare the data and waveforms?

    Or can you send me the waveforms for your sequence? (enter CFG_UPDATE_MODE, write REG0 and checksum, write REG12 and checksum, exit CONFIG_UPDATE_MODE).

    Thanks,

    Matt

  • We assumed that this was not applicable to REG0 

    "After writing to the RAM register, you may need to wait 1 or 2 ms before reading it back or you might read 0xFF - have you tried adding some wait time? The TRM recommends reading back from 0x3E to see if the subcommand has finished execution:" 

    Doing a read multiple times resolved this issue. Waiting didn't really help as much as a reread.