Other Parts Discussed in Thread: BQ34Z100,
Tool/software:
Hello,
Some context first, I'm trying to create a C++ function capable of programming BQ34z100 using a .df.fs file. Hardware wise I'm using an EV2400 connected to a computer on Windows 11. The EV2400 is connected to the BQ34z100 in I2C. The df.fs file was generated with Battery Management Studio. My function is capable of reading the file and interpreting each line in order to have the action (W/C/X) as well as the I2C address, register and data.
My function is able to write and compare simple messages such as this first part of the file :
My problem is that when trying to write a block of 100 bytes the SDKI2CWriteBlock function in CMAPI.h returns an error. I tried to find answers online but I have found nothing except for a doxygen generated documentation made in 2020.
Is there a maximum number of bytes that you can write using SDKI2CWriteBlock ?
I did multiple tests in order to try to find a working solution and found something that I dont understand, when I reduced the number of bytes to write to 30 the SDKI2CWriteBlock function returns an error but when I change the number of bytes to write to 34 the SDKI2CWriteBlock function works properly.
Why does the function work for 34 bytes length but not 30 ?
I tried to write the same data block using Battery Management Studio and it worked. Programming .srec and .df.fs works perfectly fine with Battery Management Studio so that means that is not a hardware problem.
Why is Battery Management Studio able to use SDKI2CWriteBlock with a 100 byte block but when I use the function it doesn't work ?