Hello,
I'm working on taking sensor readings from Uart but have some trouble on
receiving raw bytes thru Uart. I'm trying to take an array of bytes using
UartStream interface with Msp430Uart1C as provider. I call
UartStream.receive command to receive bytes and know that this call returns
SUCCESS. However, after bytes are sent to Uart (i'm sending bytes myself
using HyperTerminal for the time being, so i'm sure about that),
UartStream.receiveDone event is not signalled.
I also tried using Resource interface (according to TEP109) with same
provider as mentioned above and changed code such that a request is done by
calling Resource.request command (which returns SUCCESS) and
UartStream.receive command is called in my implementation of
Resource.granted event. But this event is not signalled, either.
Finally I tried to revert transmit direction (calling UartStream.send
command) for debugging in case there might be a problem in serial interface
and succeeded in sending data and UartStream.sendDone event was signalled.
Does this mean that there is no problem in serial interface (having 1200
baud rate) or Uart configuration? If it does, what may be the problem? By
the way, here is the Uart configuration I used.
msp430_uart_union_config_t config = {
{ubr: UBR_32KHZ_1200,
umctl: UMCTL_32KHZ_1200,
ssel: 0x01,
pena: 0,
pev: 0,
spb: 0,
clen: 1,
listen: 0,
mm: 0,
ckpl: 0,
urxse: 0,
urxeie: 1,
urxwie: 0,
utxe : 1,
urxe : 1}
};
async command msp430_uart_union_config_t* Msp430UartConfigure.getConfig() {
return &config;
}
Is there anyone who developed sensor drivers which send readings thru Uart
like this? Any help would be great.
Thanks in advance,
Atakan
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help