Hi,
you forgott the register for the pin function (P3SEL).
Here an example for the uart register settings (from
fet140_uart01_9600.c in the C examples from TI):
UCTL0 = CHAR; // 8-bit character
UTCTL0 = SSEL0; // UCLK = ACLK
UBR00 = 0x74; // 3.58Mhz/9600 - 372
UBR10 = 0x01; //
UMCTL0 = 0x00; // no modulation
ME1 |= UTXE0 + URXE0; // Enable USART0 TXD/RXD
IE1 |= URXIE0; // Enable USART0 RX interrupt
P3SEL |= 0x30; // P3.4,5 = USART0 TXD/RXD
P3DIR |= 0x10; // P3.4 output direction
Regards
Rolf Freitag
James Henry Dodd schrieb:
Hi Robert,
If things aren't working, are you sure you followed the UART setup sequence
properly?
Quoting slau049c.pdf from Texas:
"...
The required USART initialization/re-configuration process is:
1) Set SWRST (BIS.B #SWRST,&UxCTL)
2) Initialize all USART registers with SWRST = 1 (including UxCTL)
3) Enable USART module via the MEx SFRs (URXEx and/or UTXEx)
4) Clear SWRST via software (BIC.B #SWRST,&UxCTL)
5) Enable interrupts (optional) via the IEx SFRs (URXIEx and/or UTXIEx)
Failure to follow this process may result in unpredictable USART behavior.
..."
IMHO, the behaviour isn't unpredictable: it's sure not to work! :)
Cheers,
James
-----Original Message-----
From: [email protected]
[mailto:[email protected]]on Behalf Of soltras
Sent: terça-feira, 3 de fevereiro de 2004 08:31
To: [email protected]
Subject: [Mspgcc-users] uart
Does anybody knows if uart TX line need other side
(elsewhere) exist to send
char out from TX buffer?
In other words - does TX complete interrupt will be driven if
nobody is
listening?
robert
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users