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.

I2c Read in bq40z50

Other Parts Discussed in Thread: BQ40Z50, MSP430F5338

Hi,

I am trying  communicate with bq40z50 using MSP430F5338 through i2c communication. In this i want to read the values from the contiguous memory (address) by passing the starting address (the adddress which i want to start the read). Example suppose i want to read the data from temperature to design voltage, for that in i2c communication after sending slave address, send the starting address as 0x08 and set the size of the data is 36. My expectation is read all the values by increase the address of the parameter internally. But this is not happened. In such a scenario it will read the correct value (first 2 bytes) of the first address the rest of the values are read as 0x77, means remaining 34 bytes  are 0x77. Can you please tell me whether the internal address increment counter is there in bq40z50 or not. Shall i need to do any settings for internal address increment counter operation? I have referred the following documents

SLUU446A June 2011Revised September 2011

and

SLUUA43 December 2013

but can't able to find any answer for my doubt? I f i can able to read all the expected parameters by passing starting address alone it will be more useful, because i am in the thought process of using DMA of MSP430F5338 for this i2c operation, it will give some options for my MSP to do some other things instaed waiting till the transfer to be completed.

Any help would be more usefull.

Thanks in advance

  • Can anyone faced this kind of issue? Kindly help me, i am struct with more than a week.
  • Prakash, These are SMBus commands and not addresses in memory and the data is not contiguous in memory. You cannot use autoincrement to read this data. Tom
  • Tom
    Thanks, Your reply sounds like we can't able use DMA to read the data battery ( because i need to read all the parameter without cpu intervention, as i said my MSP can do some other execution in meanwhile). Is there any way to read as i expecting using i2c communication? My main issue is time constraints. It will take long time to read all the parameters by following command and read method.

    Thanks in Advance
  • Hi,

    Is there any alternate way to read the parameters with reduced time. Mostly I want to read manufacturer info (0x70), Manufacturer name(0x20) from battery. I have seen the following option in the TRM,

    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 data
    = 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte....
    data32_LowByte + data32_HighByte
    The gauge supports an auto-increment on the address during a DF read. This greatly reduces the time
    required to read out the entire DF. Continue with the read from the DF example. If another SMBus read
    block is sent with command 0x44, the gauge returns another 32 bytes of DF data, starting with address
    0x4020.

    Is this applicable for to read the parameters from the connected batteries with reduced time.

    Thanks in advance

  • Also I have tried to read the manufacturer info as per the procedure and I don't see any drastic time changes. When I directly accessing 0x70 is taken 5ms the same time only it taken eve when I am trying to read from  data flash address 0x4040 using 0x44 command. Is any one seen the time difference.