Hi Andris, Yesterday I continued with my i2c problems and discovered the following:
The debug values: 20:03:44 "cmd" 0x00 0x00 20:03:44 "ir read done.." 20:03:44 "init" 255 3 20:03:44 "cmd" 0x04 0x01 20:03:44 "cmd" 0x25 0x01 20:03:44 "int" 0x08 0x01 20:03:44 "cmd" 0x45 0xb5 20:03:44 "int" 0x40 0xb5 20:03:44 "cmd" 0x45 0xb5 20:03:44 "int" 0x00 0x6a <- bus error 20:03:44 "cmd" 0x05 0x6a 20:03:45 "*start*" 20:03:46 "*start*" 20:03:46 "bb read done.." 20:03:46 "***start***" 20:03:46 "cmd" 0x04 0x6a 20:03:46 "*error*" <- error means EBUSY is returned.. 20:03:47 "***start***" 20:03:47 "cmd" 0x14 0x6a 20:03:47 "*error*" 20:03:47 "bb read done.." 20:03:48 "***start***" 20:03:48 "cmd" 0x14 0x6a 20:03:48 "*error*" So the i2c-status is 0x00. According to the atmel128 datasheet page 224 this means bus error.To recover one should set TWSTO flag and clear TWINT („by writing a logic one to it“?!) I didn’t find this procedure in the device driver sources. Is the bus error state handled in the driver?
I tried to add this procedure but I wasn’t successful.. Must this be added in the driver? Have you an idea where?One more, in the attachment I added a picture of the sequence while the error occurs. Channel 1 is i2c-clock, channel 2 i2c-data. At the beginning the i2c sensors are read out successfully. Then a sensor pulls clock low for ca. 2.3 seconds. Probably because of that the bus error occurs.
Thanks in advance! Best regards Sebastian
<<attachment: F0001TEK.TIF>>
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
