Thanks for your quick answer, Ankur. Well, it seems like that's not my problem as I'm already releasing the bus resource in the writePacketDone event. As I said, I've been looking at the AD524X interface from the tmote invent sensorboard drivers, so I guess the command calls sequence is right. Could you tell me, please, how did you address your slave devices? Maybe I'm not filling the data field properly. For example, if I want to write the byte 0xCF at position 0x22, I'm using the following code, where 0xA0 is the slave device address for the write command:
uint8_t *data = 0x22CF; result = call I2CPacket.writePacket( rh, 0xA0, 2, data ); Is that right? Thanks, Miguel Dominguez On 3/21/07, Ankur Kamthe <[EMAIL PROTECTED]> wrote:
Hi Miguel, Assuming your addresses and other things are ok, where/when are you releasing the bus? I had the same problem because the bus was released too soon, so the data was not being written after the address. The fix was to put the ResourceCmd.release in the writeDone event. See the Moteiv implementation at http://www.moteiv.com/community/Boomerang_UART0_Sample there they wait till the transmit buffer is empty and then release the bus. hope this helps, ankur
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help