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.

BQ34Z100: BQ34Z100 Control command communication using HDQ interface over UART

Part Number: BQ34Z100
Other Parts Discussed in Thread: EV2400, BQSTUDIO,

BQ34Z100 Control command communication over HDQ interface 

We are using the HDQ interface over UART to communicate to the fuel gauge . The query is w.r.t to how to retrieve CHEM ID: 0x0008 ,FW_VERSION: 0x0002  etc ?

We use the below protocol for retrieving standard commands like Voltage(0x08/0x09) AverageCurrent(0x0A/0x0B) and it works for us .

1 .Read high byte (H0)

2. Read low byte (L0)

3. Read high byte again (H1)

4. If H1 = H0, then the valid 16-bit result is H0:L0 5. Otherwise, read low byte again (L1) and the valid 16-bit result is H1:L1.

This procedure is sufficient to guarantee that the 16-bit word is read correctly

As i understood Control command we need to send command and sub command . Can you help us to get Control command working by giving a flow of protocol like described above  ? Remember we use HDQ interface . 

  • Hi Mukesh,
    See example 3 of the attached app note. Even though written for i2c, the process should be largely the same. Do you have an EVM and ev2300 to test these sequence.

    www.ti.com/.../slua790.pdf

    thanks
    Onyx
  • Hi Ahiakwo,

    Thanks for your response . It helps to understand the protocol,but we will still need a lot of help to map it to HDQ protocol way. 

    As i told ,for us reading voltage and current settings etc works . For that we use read transaction over UART as below

    we place 0x9 with last bit for R/W . We set to zero for read . Device respond with data from location 0x9 

    Same we follow for reading from 0x8 . All together it makes the protocol Read high byte (H0) and Read low byte (L0) . This is as per spec http://www.ti.com/lit/an/slua408a/slua408a.pdf

    Now w..r.t to control command and sub command  , should we treat control command as a WRITE command with subcommand as data? Please see if our understanding below is right ? . This is for FW version command 0x0002

    1) Write 0x00 0x02

    2) Write 0x1  0x00

    Some delay

    Follow the protocol to read 0x0100  control pair

    3) Read high byte 0x1

    4) Read low byte 0x0

    Combine results ? 

    We tried some of the above sequence and always our read cycle used to return some constant value like 0x19 . 

    Is there any restriction w.r.t to SEALED UNSEALED access here ?

    Thanks for your help in advance 

    Mukesh.k

  • Hi Ahiakwo,

    Appreciate if some one can help .

    Mukesh.k 

  • Hi Mukesh
    We will be get a board, and test out the commands in hdq and get back to you.
    thanks
    Onyx
  • Hi Onyx,
    Got a chance to try the HDQ command sequence ?

    Mukesh.k
  • HI Mukesh,
    Sorry for the delay, I am not the one doing the testing. My colleague will be testing this today and will respond back today hopefully.

    thanks
    Onyx
  • Hi Mukesh,

    I have not been able to duplicate your issue in the lab. Please try the sequence with BqStudio and EV2300/EV2400 in an attempt to isolate the issue to the UART programmer.

    Please note: bqStudio will not detect the device in HDQ mode. Select the bq34z100-G1 manually.

    In bqStudio, disable auto refresh. The Registers screen is the only screen that will update when in HDQ mode.

    Please let me know if you are able to read and modify the registers over HDQ with bqStudio.

    Sincerely,
    Bryan Kahler

  • Hi Bryan,

    Thanks for responding .

    My query was whether the HDQ control command reading sequence am trying is right or not ? What should be the right sequence of commands and data i should do to read it out  ? Is this the right sequence 

    From my query earlier 

    ####

    Now w..r.t to control command and sub command  , should we treat control command as a WRITE command with subcommand as data? Please see if our understanding below is right ? . This is for FW version command 0x0002

    1) Write 0x00 0x02

    2) Write 0x1  0x00

    Some delay

    Follow the protocol to read 0x0100  control pair

    3) Read high byte 0x1

    4) Read low byte 0x0

    Combine results ? 

    #####

    Mukesh.k

  • Hi Bryan,

    Appreciate if you can comment on above query 

    Mukesh.k

  • Hi Mukesh,

    With HDQ, you may enter the commands as shown below.  Note, you will need to flip bytes due to endianess.

    To read the ChemID (0x0008)

    Write 0x 08 00

    Read (2 bytes).... you'll recieve 0x 07 01, which is 0x0107 (Decimal 263)

    Follow the same process for Firmware version (0x0002)

    Sincerely,
    Bryan Kahler