Part Number: LP-MSP430FR2476
I set up the EUSCI_A1 uart at 1MHz baud rate using the MSP430 baud rate calculator.
EUSCI_A_UART_initParam param = {
.clockPrescalar = 16,
.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK,
.parity = EUSCI_A_UART_NO_PARITY,
.msborLsbFirst = EUSCI_A_UART_LSB_FIRST,
.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT,
.uartMode = EUSCI_A_UART_MODE,
.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION
};
I have not enabled any interrupts. I need to transmit a low on the UART for 2.5 ms. I am hoping EUSCI_A_UART_CLOCKSOURCE_SMCLK is 16 MHz.
while(!(UCA1IFG & UCTXIFG));
UCA1TXBUF = 0x0;
__delay_cycles(40000); //Transmit 2.5ms low
UCA1TXBUF = 0x01;
When I look at the scope, I see variation in the Uart TX with changes in the Tx byte(a 5, or a 1 or a 0). I can see that the pulse width is 1 us on the uart Tx line. Do I need a timer for this delay? Not sure how a byte 0 is different from UART line active low for 2.5ms.
Thanks,
Priya