Got a very strange error here, on an MSP430G2553, which is currently being programmed up to support LIN Bus
Having setup the UART for 19k2 operation with auto-baud rate, transmitting the 0x55 sync byte works, but the timing is way out on the sync delimiter, as shown in the attached picture. For 19k2 operation, bit width is correct at 52uS, the start delimiter is correct at 13 bits width, but the sync delimiter comes in at 16bits width, instead of the 1bit it should be.
Although not strictly a violation of the LIN spec, it's certainly a bit strange considering UCDELIM settings indicate a 1bit period.
Anyone any ideas?
Code is attached (cut and paste to show settings only)
///////////////////////////////////////////////
//UART setup
///////////////////////////////////////////////
UCA0CTL1 |= UCSWRST;
UCA0CTL0 = UCMODE_3;
UCA0CTL1 = UCSSEL_2 + UCSWRST;
UCA0BR0 = 52;
UCA0BR1 = 0;
UCA0MCTL = UCBRS0;
UCA0CTL1 &= ~UCSWRST;
///////////////////////////////////////////////
//Transmit sync byte
///////////////////////////////////////////////
UCA0CTL1 |= UCTXBRK;
UCA0TXBUF = 0x55;
//time delay in here due to state machine
UCA0CTL1 &= ~UCTXBRK;
///////////////////////////////////////////////