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.

MSP430FR2355: How does one detect a UART / Serial break condition, using library code MSP430?

Part Number: MSP430FR2355

How does one detect a break condition with the MSP430?

My code so far is below:

 

 

#include <driverlib.h>

{

    EUSCI_A_UART_enable         (EUSCI_A1_BASE);
    EUSCI_A_UART_clearInterrupt (EUSCI_A1_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
    EUSCI_A_UART_clearInterrupt (EUSCI_A1_BASE, EUSCI_A_UART_BREAKCHAR_INTERRUPT);
    
    EUSCI_A_UART_enableInterrupt(EUSCI_A1_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
    EUSCI_A_UART_enableInterrupt(EUSCI_A1_BASE, EUSCI_A_UART_BREAKCHAR_INTERRUPT);
}
\
// UART Interrupt Service
#pragma vector=USCI_A1_VECTOR
__interrupt void USCI_A1_ISR(void)
{
    switch(__even_in_range(UCA1IV,USCI_UART_UCTXCPTIFG))
    {
        case USCI_NONE:            break;
        case USCI_UART_UCRXIFG:
        
       //     if( USCI_A1->STATW & UCBRK ) { // UCBRK EUSCI_A_STATW_BRK
        //        transmitString("break");  // BN
        ///    }

            rBuff[Count++] = UCA1RXBUF;      

 
        case USCI_UART_UCTXIFG:     break;
        case USCI_UART_UCSTTIFG:    break;
        case USCI_UART_UCTXCPTIFG:  break;
        default:                    break;
    }
}

**Attention** This is a public forum