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: ROM Mode Exit and writing DataFlash

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

Hi,

i have two questions:

In the TRM it states about entering ROMMode with ManfCommand 0x0F00, to exit one should "use 0x08 to ManufacturerAcess() to return". What is meant by this? All ManufacturerAccess Command are words, how should it transmit this 0x08? 0x0008 would be the command for StaticChemDFSignature...

Second question is about writing to Dataflash. Another user already asked exactly what I want to know, but unfortunately the answer was not made public... Here is the user's question which is also mine:

The only example given in the TRM is 17.2.59 Data Flash Access() 0x4000–0x5FFF...

However, this doesn't seem to match the SMBus spec?  As per theSMBus spec, block reads and block writes include a "byte count" as the first byte in the received or transmitted transaction.  Please confirm that the 78350's SMBus does not comply, and that no byte count is included in the block transactions.

But the TRM says 

"Write to DF example:
Assuming: data1 locates at address 0x4000 and data2 locates at address 0x4002.
Both data1 and data2 are U2 type.
To update data1 and data2, send a SMBus block write with command = 0x44 block = starting address + DF data block
= 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte


To read the DF, send an SMBus block write to the ManufacturerBlockAccess(), followed by the starting
address; then send an SMBus block read to the ManufacturerBlockAccess().

The return data contains the starting address, followed by 32 bytes of DF data in Little Endian.
Read from DF example:
Taking the same assuming from the read DF example, to read DF,
a. Send SMBus write block with command 0x44, block = 0x00 + 0x40
b. Send SMBus read block with command 0x44
The returned block
= a starting address + 32 bytes of DF dat
= 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte.... data32_LowByte +
data32_HighByte

Thanks in advance!

  • Hi Michele,

    The link to the other user's question is missing, but I think I can help.

    1st question: In the TRM it states about entering ROM Mode with ManfCommand 0x0F00, to exit one should "use 0x08 to ManufacturerAcess() to return". What is meant by this? Once the device is in ROM mode, I think the commands are different. The easiest way to see an example of the 0x08 command is to load firmware from BQStudio and capture the SMBus sequence on a logic analyzer. However, cycling power on the device will also bring the device out of ROM mode since it will always boot in firmware mode.

    Also, I think you are correct that the TRM example has an error. If you monitor SMBus transactions from BQStudio, you will see that the Byte Count is included as part of the transaction. For example, here are a couple of transactions I have captured on a logic analyzer:

    Reset command (0x0041): [W 0x16 0x44 0x02 0x41 0x00 0x22] 

    0x16 is the device slave address, 0x44 is the ManufacturerAccess command, 0x02 is ByteCount, 0x41 0x00 is the Reset command (little endian) and 0x22 is the PEC (not required, will be ignored if PEC is not enabled).

    Since you are asking about ROM Mode, I assume you are trying to write the R2 firmware to the device? I have a firmware updater program that can be used along with an EV2400 and I also have some Python example code for loading an srec to the device. I will send you the links to both in a private message.

    However, you may want to consider using the BQ78350-R1A as an alternative option (http://www.ti.com/product/BQ78350-R1A). It is possible to scale current with this device and the firmware comes pre-loaded. The main feature that needs the R2 is the pre-discharge function, so if you are not using this feature, the R1A may be easier from a production standpoint.

    Best regards,

    Matt

  • Hi Matt,

    thanks for the help. This question was mainly about writing the configuration into the device to set all the parameters. With your answer this question is perfectly solved.

    [My previos question which was here before the edit could be solved.]

    Best regards

    Michele