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.

Problems writing Data Flash BQ3060

Other Parts Discussed in Thread: BQ3060

Hi Community,

I am trying to write via the SMBus the Data Flash of the BQ3060 Gas Gauge because I have to set a few parameters different as default settings. 

For example I would like to change the high byte bit CC1 and CC0 to 0 and 1( Register Operation Cfg A)  to configure for two cells ( default is for 3 cells).


But for me the structure how to write or read the data flash of the BQ3060 is unclear.

I read the chapter Data Flash from http://www.ti.com/lit/ug/sluu319/sluu319.pdf page 89. There I also found a example ( Page 90) for writing to Data Flash but i don't understand it exactly.

Can anyone please give me an exact instruction step by step how to write data to the flash of BQ3060 via SMBus ( my microcontroller which is the the Master is an Atmel Mega88).

Kind regards!

Novak Krk

  • Hello,

    Can't  nobody help me to write to the data flash of the bq3060?

    I think now I am able to read the data flash I do it like this:

    start

    write Slave Address (0x16)

    then command DataFlashSubClassID (0x77)

    then for example first lowbyte 0x40 (Register Cfg A )

    then high byte 0x00

    and stop

    now read out:

    Start

    write Slave Address (0x16)

    then command DataFlashSubClassPage1..8 (0x78)

    Start

    read Slave Address (0x17)

    low byte

    high byte

    Nack

    stop

  • Hello again,

    I Changed my function into:

    void ReadBalancer (void)
    
    {
      //unsigned int WertHighByteb,WertLowByteb,WertGesamtb ;
    
      smb_start_wait(AdresseSlave_1+SMB_WRITE);
      smb_write(0x77);
      smb_write(0x40);
      smb_write(0x00);
      smb_stop();
    
      _delay_us(100);
    
      smb_start_wait(AdresseSlave_1+SMB_WRITE);
      smb_write (0x78);
      smb_rep_start(AdresseSlave_1+SMB_READ);
      smb_readAck();                             //number of bytes receiving from slave
    
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readAck();
      smb_readNak();
      smb_stop();
    
    
    
    }

    I get 10 Bytes from the Slave but the Data is not that what I expected.


    Where is my mistake? Please help me!