Hi all,
For all the ones that wants to use uart communication in tmote, some things
have to be taken in consideration:
-What uart do you want to use, UART1 is the uart associated with USB
communication so this isn't the one you want to use probably. UART0 is the
one exported in the expansion pin connector, but is also shared as a SPI bus
with stm25p flash and cc2420 radio chips.
-What type of communication you intend to establish, i.e just send bytes to
uart, just receive, receive in response to a sent command, or send and
receive in a full duplex manner were the receive is not correlated to the
send event.
Taken this things into account one cant do the following:
-In the case that you use UART1 there is no problem at all, I mean you
remove the usb or what ever but you have access to the uart, there is no
conflict chip intervening in this uart.
For the case you use UART0, the most common case:
-For just sending:
- you have to request the resource
- when granted the resource send your bytes.
- when send done release the resource.
-For just receive or send and receive asynchronously do the same:
- request the resource at boot
- own the resource for ever. YOU WON'T BE ABLE TO USE FLASH NOR RADIO
-For receive that is correlated in time with the send:
- request the resource.
- when granted the resource send your bytes.
- when send done done nothing.
- wait until the receive is done.
- then release resource.
In this last configuration you would be able to use flash and radio.
For Varun:
In your case you have some compile errors in using the interface because you
don't wire all the events the interface provides. I almost sure
PlatformSerialC and TelosSerial in particular modules are related to UART1
means USB at 115200 and other parameter set, where are you connecting your
leds?.I had posted other mail response in July 2008 were I copy/paste
example code on how to do this, in particular the case were ones request the
resource for ever, you only have to add the release of the resource when you
no longer need it.
mail me if isn't clear enough, or you have another question. to do this add
my mail in the cc, so it would be in the mailing list for others to get an
answer, just like i did in this mail.
-Bill
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help