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.

BQ78350: How do I use ManufacturerAccess() : 0x00 and ManufacturerBlockAccess(): 0x44 to read OperationStatus() ?

Part Number: BQ78350
Other Parts Discussed in Thread: BQSTUDIO,

In  my program, I  want to use ManufacturerAccess() or ManufacturerBlockAccess() comand to read OperationStatus() .

What is the command sequence?

Should  I  fisrt  send a  IIC write conmand writing  three bytes,0x44, 0x54 ,0x00 to bq78350

and then start a new command to  read six bytes from bq78530?

I tried many  different command sequences , but I didn't get the right data.

  • Hi Feiyue,
    In an example board operation status A shows 0x6101 and operation status B shows 0x0000
    Using the bqStudio Advanced Comm SMB tool, I use the write word tool command 00 word 54 . Using the Read Block tool I read block 44.
    The result in the transaction log is (sorry, the tool does not display well here):
    TimeStamp , Address , Operation , Command , Length , Data , Status ,
    2018-05-29 02:37:31 281 , 17 , Wr Word , 00 , 1 , 54 , Success
    2018-05-29 02:37:32 347 , 17 , Rd Block , 44 , 6 , 54 00 01 61 00 00 , Success

    The data read:
    44 is the read block command
    6 is the length in bytes following. The data will be little endian.
    54 00 is the command sent, 2 bytes, ( 0x0054)
    01 61 is the Op status A, 2 bytes, (0x6101)
    00 00 is the Op status B, 2 bytes, (0x0000)

    Sending a 16 bit word (0054) the log shows the extra byte, the data returned is the same.
    2018-05-29 02:37:55 391 , 17 , Wr Word , 00 , 2 , 0054 , Success
    2018-05-29 02:37:58 601 , 17 , Rd Block , 44 , 6 , 54 00 01 61 00 00 , Success
  • Hi,

    I think you are missing the data length in your request.

    In order to fetch data, here is the sequence of bytes that you need to send:
    byte 1: BQ78350 address with write bit
    byte 2: 0x44 (Mfr access command)
    byte 3: 2 (data length)
    byte 4-5: 0x54, 0x00 (OperationStatus (0x0054) in little endian format)

    You then need to restart a new command:
    byte 1: BQ78350 address with read bit
    byte 2: 0x44 (Mfr access command)
    Switch to read

    Regards,
    Michel
  • I find the command 0x54 is also listed in ordinary SMB commands so that I don't have to use ManufacturerAccess() commands.

    I first send BQ78350's address with a write bit.

    Then I send the command 0x54.

    Finally ,I begin to read from bq78350, I get five bytes.

    The first byte is 0x04, I think it is the data length of received data.

    I get the right information,

    but because the datasheet does not detailed described the process, I am not sure I am right.

    Do I execute the right process?
  • They both return the same data.

    If you refer to the BQ78350-R1 reference manual (October 2016 revision), you will see in Section 17.49 (0x54 OperationStatus) that it says to refer to the Section 17.2 (which is 0x0054 OperationStatus)

    It is up to you to decide which one you want to use.

    Regards,
    Michel

  • So, I am right? 

    The right sequence is :

    byte 1: BQ78350 address with write bit
    byte 2: 0x54

    byte 3: BQ78350 address with read bit

    Data I  will receive is :

    byte 1: 0x04 (data length)
    byte 2、byte 3、byte4、byte5:OperationStatus();

  • Yes, that is the correct sequence.

    Regards,

    Michel