This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C123GXL: I2C communication with IMU hangs after some time using Wire.cpp, some replacement?

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: ENERGIA

Hello to all;

I'm making a quadcopter controller using the tivaC launchpad and energia.

The problem is that my communication with the IMU (AltImu 10-v5), hangs after some time from 10sec to 10 minutes, and the program stops and my quadcopter falls like a rock.

Searching on the web I found that for arduino there is a replacement for Wire.cpp, to get out of the loop after 10000 cycles to avoid the be hanged, but I tried to use this WSWore.cpp but it doesn't be compatible withTivaC launchpad.

Do you have some solution or some idea to avoid it?

Thanks a lot

Regards

  • Hi,

     I think you want to find out why it hangs to understand the rootcause first. Do you have proper pullup on the bus? Can you use the scope to show the bus activities? Please find out if the slave (IMU) is holding the SCL clock. What is the read out of the I2CMCS register? This register will tell you the status of the I2C master operation.