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.

msp432 baud rate

hi all,

some questions.

1)what is the higher clock frequency that i can give to Uart serial communication? If i have DCO at 24Mhz, can i set it? 

2)If i have smclk at 12Mhz, the baud rate is fixed to 9600? Can i change baudrate without change clock?

  • UART has 7MBaud as maximum transmit frequency and 24MHz as maximum input frequency. The baudrate can be set very flexible and is not fixed to 9600Baud. Look at the code examples and the Technical Reference Manual for more information.

    Dennis
  • The maximum eUSCI input clock frequency in UART mode depends on the value of VCORE. The frequencies that Dennis mentioned above require VCORE to be 1.4V (refer to Table 5-35 in the datasheet).

    Also, you can change the baud rate without changing the clock frequency within a reasonable limit (e.g. BRCLK equal to 32.768 kHz can't support a baud rate of 115200). Depending on BRCLK frequency and the required baud rate, you'll have to change UCOS16, UCBRx, UCBRFx, and UCBRSx as shown by Table 22-5 in the TRM. Referring to this table, you can quickly modify the UART code examples to achieve the desired baud rate.

    Regards,

    James

    MSP Customer Applications
  • Ok thanks for the explanation. Another question:

    If my uart clock is set to 12Mhz (SMCLK), reading the table i can choose different baud rate changing parameters. 

    1)Different baud rate change only the communication speed right?

    2)If i want baudrate = 38400 i have (from table): UCOS16=1, UCBRx=19, UCBRFx=8, UCBRSx=0x65. Is it correct write as the code written below?

      // Configure UART
      (...)
      UCA0CTLW0 |= UCSSEL__SMCLK;             // 12Mhz
      UCA0BR0 = 19;                           // 12000000/16/38400
      UCA0BR1 = 0x00;
      UCA0MCTLW = 0x6500 | UCOS16 | 0x0080;
      (...)

  • Hi Luca!

    Luca Palombella said:
    Different baud rate change only the communication speed right?

    Yes, that is right.

    Luca Palombella said:
    If i want baudrate = 38400

    I did not test it, but from these tables...

    ...I would say it is:

    UCA0BRW   = 19; // Same as UCA0BR0 = 19; and UCA0BR1 = 0;
    UCA0MCTLW = (0x6500 | 0x0080 | UCOS16);

    Same as yours.

    Dennis

**Attention** This is a public forum