Re: [WheelCommander] I2C comm failure with analog reads



Milton,

I've found and fixed the problem. There was a bug in my code that was supposed to be protecting access to the ADC from multiple threads using a semaphore. Anyway, I'd like to send you a build of the firmware to try, if you're willing to give it a go.

-Pete

Milton Street wrote:
It would appear that if you do _not_ send any movement command(s)... or, in other words as long as the WC PID routine(s) are not active... that then there is no problem with the I2C comm when polling the battery level (or any other analog input value).

If even just one  simple Velocity and Go! command are sent first and the a loop started after to poll any analog data... then eventually at some point the WC will lock up the I2C bus. When it does, the SCL line of the WC becomes locked low preventing any further I2C communications. The SDA line seems to   end up locked low also (although I am not 100% positive that it always ends up low).

I should also mention that the majority of the time (but, not always) the Green LED will also turn off when the WC locks up the I2C lines.




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.