Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Problem with start bit detection with F5438A

$
0
0

Hello,

I'm experiencing a strange behavior from the UART of an MSP430F5438a.
I read 10 bytes every 500ms and in about 10% of the cases the start bit is not detected correctly and it is read as a data bit (which makes my received byte being shifted right by two).
You can see in the picture below, I receive 00010111 which is OK :
And sometimes the start bit is detected at the wrong place and I receive 01000101 (which is wrong).
This acquisition is run continuously and it works fine in 90% of the time but in about 10% of the time the second case is happening.
For information I'm using the UCA0 uart, with the following settings :
        UCA0CTL1 |= UCSWRST;
        // 8N1
        UCA0CTL0 = 0x00;        // 8-bit data, no parity, 1 stop bit
        UCA0CTL1 |= UCSSEL1;    // BRCLK = SMCLK
        UCA0MCTL = UCBRS_0;
        UCA0BR0 = 1180 & 0xff;
        UCA0BR1 = 1180 >> 8;
        // enable USART1
        UCA0CTL1 &= ~UCSWRST;
Any idea?
Best regards,

Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>