I would hazard a guess that loading a byte into
that particular MSP register causes the UART
hardware to send.
TOSH_SIGNAL() flags a routine as an interrupt handler,
search this list and various documentation for more.
There is also a TOSH_INTERRUPT() that is similar and
I keep forgetting what the difference is, something
to do with the interrupt state during the routine
I think.
I would further hazard a guess that the UART hardware
can interrupt once it is done transmitting. To validate
my guesses one would have to read the UART section of
the MSP chip manual, which you can find online.
MS
Xiaohui Liu wrote:
> Hi,
>
> I'm trying to understand how a packet is sent over UART and at the
> lowest layer (HplMsp430Usart1P under $TOSDIR/chips/msp430/usart) I can
> track, the following is found:
> MSP430REG_NORACE(U1TXBUF);
> ...
> async command void Usart.tx(uint8_t data) {
> atomic U1TXBUF = data;
> }
> Can anybody explain why this physically transmits the data to UART?
>
> Also I'm tracking the source of sendDone event to see where it is
> originally signalled, and in the same component I notice:
> TOSH_SIGNAL(UART1TX_VECTOR) {
> signal Interrupts.txDone();
> }
> What is TOSH_SIGNAL() and why a byte is regarded as sent when
> TOSH_SIGNAL() is called back?
>
> Thanks in advance.
>
> --
> -Xiaohui Liu
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help