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.

BQ27Z561: How to test INT functionality?

Part Number: BQ27Z561

Hello,

I am trying to test the interrupt functionality of the INT pin. The simplest way I see to do this is to write the values 0x0C and 0x04 to the IO Config address as so:

ADDR[0x4484] = 0x04  // Enable interrupt function on INT and set interrupt polarity to active LOW

ADDR[0x4484] = 0x0C // Enable interrupt function on INT and set interrupt polarity to active HIGH

ADDR[0x4484] = 0x04 // Enable interrupt function on INT and set interrupt polarity to active LOW

The idea here is that changing the polarity should simulate an interrupt, however this doesn't seem to work as the INT pin does not toggle.

What am I missing?

Thanks!

  • Hi Derek,

    We will double check and get back to you.

    Andy

  • Derek,

    When changing a config bit that impacts hardware functions a reset of the device is needed. You can power on/off the device or issue the reset command. The best method to test would be to enable them how you plan to use them, then force the Voltage to temperature condition on the gauge to see the INT pin behavior. 

    Thanks,

    Eric Vos

  • Thanks for the feedback. I think my issue may be that the device is sealed. When I write data to Data Flash (IO Control) and read it back, I see that my data is not written.

    Does the fuel gauge automatically seal itself upon reset or power cycle? Do they come factory sealed?

    Thanks

  • Derek,

    The device does not come factory sealed, however if you seal it one time every power cycle after the device will come back up sealed. 

    Thanks,

    Eric Vos

  • Hmm ok. I have not sealed this device.

    These are my commands to write the value 0x04 to Data Flash register IO Config (0x4484) and read it back.

    wr = write

    rd = read

    --------------------------------------------

    Write Procedure:

    wr 0x3e844404

    wr 0x3e4100  // Reset device

    Read Procedure:

    wr 0x3e8444

    rd 0x3e (3 bytes)

    Response: 0x844400   // I expect this to be 0x04 not 0x00

    -------------------------------------------

    Are the above operations correct for writing and reading IO Config data flash region?

    Thanks again for all your help.

  • Derek,

    for the bq27z561 in order to write DF you need to also write the checksum and length to address 0x60. See below for an example of how to do a DF write. To check if you are sealed you can read the SEC1, SEC0 bits on the resgisters screen. 1,1 means sealed.

  • Eric,

    Thanks for your help. I was able to set the IO Config bits per your steps above and will mark your post as the answer. I have a couple more questions regarding this however.

    1. What document is the bulleted "Procedure" in your post above outlined? Is this a document that I missed or something you typed up? (It is very helpful)

    2. When I set the IO Config bits to enable the INT pin and reset the device using the 0x4100 command, I see the INT pin toggle a few times before settling down. Is this expected?

    i2c=1,55,3e,4100
    Test I2C write
    I2C write - Slave Addr: 0x55, Register: 0x3E, Payload: 0x4100
    > 10-02-2018 00:17:26.970 APP: (APP Task) APP_EVENT_FG
    10-02-2018 00:17:27.976 APP: (APP Task) APP_EVENT_FG
    10-02-2018 00:17:28.456 APP: (APP Task) APP_EVENT_FG
    10-02-2018 00:17:30.481 APP: (APP Task) APP_EVENT_FG
    10-02-2018 00:17:31.486 APP: (APP Task) APP_EVENT_FG

    Thanks!

  • Derek,

    1) The above was a .ppt file i created. It is not released as an official document. I have attached it here for others to view. 

    2) The Int pin might be setting and clearing based on a few things Voltage, Temp, SOC changing. So yes i would say this is generally acceptable.

    Thanks,

    Eric VosPractical_use_of_Single-Cell_Gas_Gauges_Eric_Vos.pdf