![]() ![]() Use the HW reset or cycle power to clear the bus." That held the bus LOW should release it sometime within those nine clocks. "If the data line (SDA) is stuck LOW, the master should send nine clock pulses. I was carefully reading the NXP (Phillips) document for the I2C bus specification and in section 3.1.16 Bus Clear you can find the paragraph: ARDUINO DUE I2C SOFTWAREThat's why I ask you if someone has an idea to tackle this problem from the software side. ARDUINO DUE I2C FULLAnd that being said I work full time on investigation hardware related problems but couldn't find any obvious problems yet. The hardware is pretty big and is hard to explain in this topic. With a higher sampling rate the clock is perfectly fine.Īlthough the root of this problem might be hardware I ask you to discuss software based solutions here. It was necessary to set it that low so I can capture a longer period of time. Please be aware, that the different clock pulse length on the logic analyser picture came from the low sampling rate of 200kHz. Attached you can find a picture from the logic analyser capturing the moment of the bus lock up and an oscilloscope picture showing the signal quality. The Due is configured as master and is connected to several slaves, PWM chips, temperature sensors, EEPROM. I assume that the communication cycle is somehow disturbed and one of the slaves is holding the bus low. More precisely I'm having random (several times a day or none at all) the situation were the data line of my I2C communication is stuck low. of course because an error has ocurred.As the title of this topic says, I'm having problems with my Due using I2C. So, when SDA remains HIGH during this ninth clock pulse, this is defined as the Not Acknowledge signal. The acknowledge bit allows the receiver to signal the transmitter that the byte was successfully received and another byte may be sent. BUT, in the Arduino DUE case at the end of this frame I have a NACK or 1 looking like: 110000011, and I don't know why. ARDUINO DUE I2C CODEI checked the I2C signal in my oscilloscope comparing the signals between the code with Arduino UNO (wich works) and the code with Arduino DUE and I saw a little difference whe the "Wire.requestFrom()" runs itself: The frame what this code should output by I2C is: 0圆0=1100000, the read bit=1, and finally the ACK=0 all the frame looks like: 110000010. Serial.println(recived, HEX) //Print bytesĪs I said, this code works perfect in my other Arduinos. Serial.println("Bytes Received: " + String(byteRX)) ![]() While(Wire.available()) // Returns the number of bytes available. The code I use to ask to my device is the follow: #include ![]() The curious thing is that my device do actions by "I2C" but no answer to me. I adapt it to the new environment with its "pullups" at 3.3V, but it does not work: I can't read the information it gives my slave device. There is a particular one with "I2C", it is already working on my other Arduinos. after buy it, i startet researching to use this arduino, fixing and adapting codes to start to make functional my old projects in "DUE". I even seen official examples with errors or missing information. Its specifications are promising, but its support is poor. In this moment I wanted to start with Arduino DUE. I'm the owner of Arduino UNO, NANO and MEGA. Thanks for taking the time to read my post. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |