Hello everyone,
I'm using the UART in a weird way. My UART is
connected to three devices (another mica2 mote, a
laptop and a GPS) with a multiplexor. I switch this
mux every 300 ms, and send messages using UART
component (interface ByteComm).
After a random time (an hour, two... even three days)
the communication through UART dies, but other system
parts continue working.
In UARTM, I found this:
async event result_t HPLUART.putDone() {
bool oldState;
atomic {
dbg(DBG_UART, "intr: state %d\n", state);
oldState = state;
state = FALSE;
}
/* Note that the state transition/event signalling
is not atomic.
It is possible, after state has been set to
FALSE, that
someone calls txByte before txDone is
signalled. The event
handler therefore may not be able to transmit.
Sharing
the byte level can be very tricky, unless we
assure non-preemptiveness
or have client ids. The UART implementation is
non-preemptive,
but is not assuredly so. -pal*/
if (oldState) {
signal ByteComm.txDone();
signal ByteComm.txByteReady(TRUE);
}
return SUCCESS;
}
If my system calls txByte before txDone or
txByteReady, what happens with the UART?
___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help