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.

Writing in the flash memory in a BQ27510-g2

Other Parts Discussed in Thread: BQ27510-G2, MSP430FG4618

Hello, I have two questions about the BQ27510-g2 gas gauge:

I don't have the EV2300 and I want to write in the flash memory, I been able to read the flash memory, but when I try to write a value, the value never seems to move to the flash memory after I send the checksum. The steps that I´m following to write are the next ones:

- first, I send a 0x00 to 0x61 (BlockDataControl).

-next, a 0x3A to 0x3E (DataFlashClass) to select the manufacturer block A.

-then, a 0x00 to 0x3F ( DataFlashBlock) to select the fist 32 bytes block.

-after that, 0xA8 to 0x45 (DataBlock) to write a 0xA8 to the specific datablock.

-And finally, a checksum of (0xFF - 0xA8) = 0x57 is sent to 0x60, to move the value to the memory flash.

What is that I´m missing?, could you please help with that.

 

And the second question is:

Why the gas gauge is not sending the acknowledge after I send a Command?, the acknowledge bit is only sent after the adress of the device, but never after a command. The command is actually recognise by the device, and sends the correct Data, but the acknowledge bit is not sent. Could you please help me with these two questions.

Thank You. 

  • Hi Philipe,

    First of all Iam very sorry I dont have answers for any of your questions, instead i need some help from you.

    Iam having BQ-27510-G2 EV and MSP430FG4618 evaluation board ( I dont know how far this is useful) my problem is I dont have EV2300. Iam now stuck up with how to start with 27510. Please suggest me how do i start using this without Ev2300 and please send me the code also if  u have any that has to be used for the start up. Please help me as Iam in urgent requirement.

    Thanks in advance.

  • A checksum consist of address. command and data. Once the checksum is send, the gauge will execute the command and send the ACK bit. 

     

    here is a example code:

     

    lError = WriteI2CByte(&H0, &HC, &H16) '//mass erase command                                              
        lError = WriteI2CByte(&H4, &H83, &H16) '//setup for mass erase                                           
        lError = WriteI2CByte(&H5, &HDE, &H16) '//setup for mass erase                                           
        iChecksum = (&HC + &H83 + &HDE) Mod &H10000

     

    Ming