12/5/2023 0 Comments Arduino due i2c![]() ![]() My understanding is that I can go down to 0.So I’ve done 707’s route~ My favourite character that I was so looking forward to ♥ Then the 10k:s on the 5 VDC SCL/SDA side results in a 20k connection between SCL and SDA, is that acceptable? However, I experience the same problem when powering the IMU through "Vin" with 3.3 VDC (should be OK according to the documentation).Īnyway, I will try to reduce the pull-ups by powering the IMU through "Vin" and paralleling the existing resistors (1k || 10k). when I power the IMU with 3.3 VDC directly. But looking in the IMU schematic again( Adafruit 10DOF Schematic) makes me a bit curious what happens when "Vin" is not present, i.e. In terms of pull-ups there is 1k (Due side) in parallell with 10k (IMU side), so ~0.9K that is. greater valued capacitors would do the trick. But maybe the high frequency ripple is not the devil here, maybe the bus sags during the NMEA message transfer, i.e. When I previously tried adding capacitance (1 uf electrolyte + some film capacitor) I also observed the voltage ripple on the 3.3 VDC bus, it made no change. At the moment I'm travelling so I have no spare components available (just traveling with bare minimum: Due+IMU+GPS, and my cross country skies). I'm heading into that direction as well, adding more capacitance. Let me know what else information you need. Please advice before I permanently goes insane and take up knitting as a hobby instead. ![]() I'm using 1.5.8, so the Wire library fix shall be included. But obviously it works when the GPS isn't sending NMEA. ![]() I have been diving in the Arduino code libs after clues - the Wire/TwoWire/TWI code is a bloody mess. Turning interrupts OFF (using "noInterrupts()") during I2C communication did no difference as well. Added capacitor to the 3.3V (voltage taken from the Due). I have tried to separate the I2C wires as far as possible from the serial wires (in case of EMC issue). I have tried different I2C frequencies, different GPS NMEA output rates and baud rates. Sometimes I stumble upon a NACK, but that does not hang the bus. Interesting is that the TXRDY bit is set when it fails in the TWI_WaitTransferComplete() and TWI_WaitByteSent() functions. TWI_WaitTransferComplete(), called from endTransmission(), reason: timeout TWI_WaitTransferComplete(), called from requestFrom(), reason: timeout The I2C communication fails on different places, the following places (functions in Wire.c) are the ones I have observed so far: If I tell the GPS to be silent, but still active, I never see this issue (running four hours, reading sensors at around 200 Hz). The failures seems to occur about the same time as the GPS sends its message. The bus gets locked and I have to power toggle or toggle the SCL wire a couple of times (slave is holding SDA low). Occasionally (<5 min) the I2C communication fails. I have a test sketch reading the IMU sensors (rate, acceleration, magnetic), and reading the GPS NMEA sentence. The GPS is connected to the Serial2, powered by 3.3V, using 9600 baud setting, only NMEA $GPRMC sentence active. I'm powering the IMU with 3.3V, so the builtin lever shifter in the IMU is not active. The IMU is connected to pin 20 and 21 (SCL, SDA) on the Due (have tried SCL1 and SDA1 as well). I have this problem driving me insane the last couple of weeks. ![]() I will try my luck in this Due dedicated section. This is a re-post, previously I did a post on a different section here on the forum. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |