Closed ghost closed 6 years ago
A couple things come to mind:
Are you using a bus pirate? The nomenclature looks that way. We've had extremely bad luck using the pirate to trouble shoot I2C calls. Use a logic analyzer instead. Namely, the way BP does multiple byte reads is super odd and we haven't figured out how to get it to read reliably.
The 'bug' you describe seems odd. I haven't used the Due with the MLX90640 but what you describe is what I saw when I was first designing the library. My problem was that the MLX90640 does not auto-increment the address pointer. See this issue. Be sure you're writing the address to read from before doing a read.
Hi There
I got the same problem on an https://github.com/rogerclarkmelbourne/Arduino_STM32 .. my EEPROM reads like
8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8
A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0 0 8 A7 799F 0 2061 4 320 3E0 81F 2C48 1186 499 0 188 0
startAddress: 2440 BytesRemaining: 1536
startAddress: 2450 BytesRemaining: 1504
startAddress: 2460 BytesRemaining: 1472
startAddress: 2470 BytesRemaining: 1440
startAddress: 2480 BytesRemaining: 1408
startAddress: 2490 BytesRemaining: 1376
startAddress: 24A0 BytesRemaining: 1344
startAddress: 24B0 BytesRemaining: 1312
startAddress: 24C0 BytesRemaining: 1280
startAddress: 24D0 BytesRemaining: 1248
startAddress: 24E0 BytesRemaining: 1216
startAddress: 24F0 BytesRemaining: 1184
startAddress: 2500 BytesRemaining: 1152
startAddress: 2510 BytesRemaining: 1120
startAddress: 2520 BytesRemaining: 1088
startAddress: 2530 BytesRemaining: 1056
Hi. Tested your code with Arduino Due. I2C problem while reading EEPROM dump and other large registers. In MLX90640_I2CRead(), its seems like the startAddress (which will be updated every I2C_BUFFER_LENGTH) will not be recognized by the MLX90640. If you print out the resulting EEPROM dump (eeMLX90640), the first 32-bytes will be repeated over and over. Any suggestions?
Edit: I2C Dump: Start, h66 [ h33 | WR ], h24, h00, Stop Start, h67 [ h33 | RD ], h00, h09, h00, hAD, h49, h9A, h00, h00, h20, h61, h00, h05, h03, h20, h03, hE0, h16, h0B, hA2, h29, h01, h85, h04, h99, h00, h00, h19, h01, h00, h00, h00, h00 NAK, Stop Start, h66 [ h33 | WR ], h24, h10, Stop Start, h67 [ h33 | RD ], h00, h09, h00, hAD, h49, h9A, h00, h00, h20, h61, h00, h05, h03, h20, h03, hE0, h16, h0B, hA2, h29, h01, h85, h04, h99, h00, h00, h19, h01, h00, h00, h00, h00 NAK, Stop Start, h66 [ h33 | WR ], h24, h20, Stop Start, h67 [ h33 | RD ], h00, h09, h00, hAD, h49, h9A, h00, h00, h20, h61, h00, h05, h03, h20, h03, hE0, h16, h0B, hA2, h29, h01, h85, h04, h99, h00, h00, h19, h01, h00, h00, h00, h00 NAK, Stop
Its seems like there is a "bug" in the Wire implementation of the Arduino Due. Even with Wire.endTransmission(false), a STOP instead of a Restart will be sent. Therefore I would recomend not using the Due for I2C related tasks.
Issue can be closed.