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.

BQ40Z50-R1: How to retrieve the Blackbox data through SMBUS interface/SBS command

Part Number: BQ40Z50-R1
Other Parts Discussed in Thread: BQSTUDIO

Hello,

Is it possible to read all the blackbox(all the data in technical ref manual under section 14.12) data through SMBUS interface/ SBS command?

BR

WF 

  • Hello WF,

    The SBS specification does not have any commands to read blackbox data, so this is done through manufacturer access commands. The blackbox data is available through SMBus commands used to access data flash

    See section 14.12 Black Box

  • Hello Shirish

    The Section 14.12 is just showing the content of the black box, it does not show "how" to retrieve it through SMBUS. 

    From table 13.1, i could see BlackboxRecorder and BlackboxRecorderReset, but none of them are related to read the content of Blackbox

    Could you teach me how to access the black box content through SMBUS? eg, register address? and the allocation of all the content?

  • Hello Chin,

    See TRM section 13.1.62 0x4000–0x5FFF Data Flash Access()

  • Hello Shirish

    thanks for the tips, However i try to follow to retrieve the BlackBox through ManufacturerBlockRead as suggested by you. but the Slave was initiated a NACK after receiving the first 0x00. I confirm that the NACK was triggered by the Slave is because the same piece of C-Code is use to write to Serial Number(0x1C) was working OK. And the BQ40Z50-R1 are in FULL-ACCESS mode. 

    FYI, I also try to perform DF read from CUV register, it also receives NACK right after 0x4F(CUV register DF address 0x484F) in second diagram.

    Can you advice is there any additional pre-condition that had to be met in order to read the DF area?

  • Hello Chin,

    I would recommend trying this with bqStudio first to eliminate the possibility of mismatch in MCU code. Use the "Advanced Comm" tab so send the commands. Also turn off dashboard scanning to prevent interference from Dashboard.

  • Hello Shirish

    I am trying your suggestion, However, there are still a periodic SMBUS activity after i turn off the "Scan" from BQstudio see figure 1

    Figure 1:


    Please advise how to properly turn off the entire SMBUS comms from BQstudio.


    And I would like to confirm with you is my sequence correct when using the "Advance Comm" features to read the BlackBox see figure 2
    Step 1 - in Write Block column, send block with 0x44 0x00 0x40
    Step 2-  in Read Block column, send block with 0x44 and wait for the BQ40Z50-R1 to return valid data

    And finally i would like to confirm is the very first BlackBox Data Flash address is it 0x4400?(1st Safety Status A)

    Figure 2

  • Click on the green text to turn off dashboard scan.

    AltManufacturerAccess() is 0x3E

    Change 0x44 to 0x3E

  • Hello 

    Thanks for the tips to disable the "Auto Refresh" tab

    I try to use the AltManufacturerAccess() ,0x3E using BQstudio to initiate SMBUS comms, but getting an error from BQstudio See Figure 1 below

    Figure 1.


    Anyway. I use back with 0x44 ManufacturerBlockAccess(). And I manage to get a proper response with the sequence below: see Figure 2

    Figure 2

    And when i probe the SMBUS SDA/SCL line. actually, there is an additional byte(which does not show in BQstudio GUI) before the RegisterAddress(0x00 0x44) phase. see Figure 3
    Figure 3

    the 0x02(highlighted in circle) indicating the total number of bytes in the TX bytes. which explain why My very first attempt to read the BlackBox Dataflash area fail (my First attempt, the SMBUS data sequence is <DeviceAddress> 0x44 <ACK> 0x00 <NACK>  ). The NACK is initiated by the BQ40Z50R1 after seeing a 0x00.

    So same thing as when come to Block Read process thereafter. see Figure 4

    Figure 4

    The highlighted circle indicating the total number of bytes that supposed to be received in the block read process.
    As you can see that there is a total of 0x22(or 34 bytes in decimal) within the BlackBox Data Flash Area of 0x4400.
    However , from the technical reference manual its indicating only 1 byte of data within the BlackBox Data flash Area of 0x4400. See Figure 5

    Figure 5

    Could you advice and explain the discrepancy? What i really want to know is what is the byte/bits allocation/bit mapping of the black box.
    Thanks for your prompt reply in advance 

  • TI USA has a holiday today so we'll answer on Monday.

  • Hello Chin,

    See TRM section 13.1.62 0x4000–0x5FFF Data Flash Access() for accessing data flash contents.

    https://www.ti.com/lit/ug/sluubc1d/sluubc1d.pdf

    ManufacturerBlockAccess() is command 0x44 or 0x00