Other Parts Discussed in Thread: BQSTUDIO
Hello,
The BQstudio *.df.fs calibration file has commands much longer than 32
bytes.
32 bytes at a time is all our ADK I2C library can handle (it's an embedded processor).
This is fairly standard. It's the same with the Arduino and Linux
i2c API's. Writes and reads are limited to 32 bytes at a time.
And if you look at the example gauge.c code in the appendix of
slua801.pdf you will see that any data past 32 bytes is thrown away
by their example code.
Look at the gauge_execute_fs() function.
The pData array is only 32 bytes.
When it is filled by a write, the 'W' switch case, only sizeof(pData)
bytes are used. After the gauge_write() call, the logic drops out of the
switch and the remaining bytes of the line are discarded with this
while ((pFS != pEnd) && (*pFS != '\n')) pFS++; //skip to next line
So for example a line like this in the *.df.fs
W: 16 00 02 00 00 00 EA FF 33 B1 FA 33 6C FB 33 95 FE 33 AD FE 33 FF FF
3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF
3F FF FF 3F FF FF 3F 16 00 3F 58 CB 33 C3 00 08 11 00 00 00 00 00 FF AA
0E FB A7 0E FF A6 0E FF A1 0E FF A0 0E FE A3 0E 61 A2 0E DE FF 3A 65 FF
3A E2 FF 33 FF AF 0E
Only generates this for the data buffer to the gauge_write() command
that we are supposed to implement.
02 00 00 00 EA FF 33 B1 FA 33 6C FB 33 95 FE 33 AD FE 33 FF FF 3F FF FF
3F FF FF 3F FF FF 3F FF
So, is it possible that there is a setting in the tool you we can use to
create these files that will chunk the data writes to 32 bytes or less?
How do we break up these data writes otherwise?
thanks a lot,
Dave.