Tool/software:
When I configure the UART out of one of the ports, The UART trasmitts at 0-100mv instead of 0-VCC. I've tried UCA0TX and UCA1TX. For some reason the micro is not driving the UART signal.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
When I configure the UART out of one of the ports, The UART trasmitts at 0-100mv instead of 0-VCC. I've tried UCA0TX and UCA1TX. For some reason the micro is not driving the UART signal.
//disable high impedance
PM5CTL0 &= ~LOCKLPM5;
// Set DCO to 1MHz
CSCTL0_H = CSKEY_H; // Unlock clock registers
CSCTL1 = DCOFSEL_0; // DCO = 1MHz
CSCTL2 = SELS__DCOCLK | SELM__DCOCLK; // Set SMCLK = DCO, MCLK = DCO
CSCTL3 = DIVS__1; // SMCLK = DCO / 1
CSCTL0_H = 0; // Lock clock registers
// Setup P2.0, P2.1 for UART
P2SEL0 |= BIT0 | BIT1;
P2SEL1 &= ~(BIT0 | BIT1);
// Initialize eUSCI_A0 UART
UCA0CTLW0 |= UCSWRST; // Put eUSCI in reset
UCA0CTLW0 |= UCSSEL__SMCLK; // Select SMCLK
// Baud Rate calculation (1MHz / 9600)
UCA0BRW = 6; // 1MHz/9600 ~ 104
UCA0MCTLW = (8 << 4) | UCOS16 | (0x20 << 8);
// UCBRF = 8, UCOS16 = 1, UCBRS = 0x20
UCA0CTLW0 &= ~UCSWRST; // Release from reset
UCA0IE &= ~UCRXIE; // Disable RX interrupt (for now)
It is the launchpad. I disconnected the uart tx rx jumpers after programming and it seemed to do the same thing
> P2SEL0 |= BIT0 | BIT1;
> P2SEL1 &= ~(BIT0 | BIT1);
These should be the other way around [Ref datasheet (SLASE54D) Table 9-23]. Try instead:
> P2SEL0 &= ~(BIT0 | BIT1);
> P2SEL1 |= (BIT0 | BIT1);
**Attention** This is a public forum