Dear all,
I'm trying to properly configure a 5438a UART w/ a 24 MHz external quartz. Unfortunately, the family manual has suggestions settings up to 20 MHz (pages 17 and 18 SLAU208).
My actual sequence of instructions setting the serial is reported below, but I'm not sure it's completely correct, since I'm experiencing some seldom byte loss in transfering a stream of information to a PAN1321 Bluetooth Module @ 115200 bps.
- - - - - - - - - - -
UCA1CTL1 = UCSWRST;
UCA1CTL0 = 0;
UCA1CTL1 |= UCSSEL__ACLK; // use ACLK as baud rate clock - ACLK is 24MHz divided by 2
// Set up for 115200 baud (12000000 / 115200) = 104
UCA1BR0 = 104;
UCA1BR1 = 0;
UCA1MCTL = UCBRS_1; //see pag. 17 USCI Operation- UART Mode
UCA1CTL1 &= ~UCSWRST;
- - - - - - - - - - -
Is there anything wrong or that could be better implemented?
Thanks a lot
Paolo