SLAA908A September 2019 – September 2021 MSP430FR2032 , MSP430FR2032 , MSP430FR2033 , MSP430FR2033 , MSP430FR2153 , MSP430FR2153 , MSP430FR2155 , MSP430FR2155 , MSP430FR2310 , MSP430FR2310 , MSP430FR2311 , MSP430FR2311 , MSP430FR2353 , MSP430FR2353 , MSP430FR2355 , MSP430FR2355 , MSP430FR2422 , MSP430FR2422 , MSP430FR2433 , MSP430FR2433 , MSP430FR2475 , MSP430FR2475 , MSP430FR2476 , MSP430FR2476 , MSP430FR4131 , MSP430FR4131 , MSP430FR4132 , MSP430FR4132
The firmware supports full duplex UART communication. It also supports UART packets with eight data bits, least significant bit (LSB) first, no parity bit, and one stop bit. Because two serial interfaces are required, this firmware can only be used on MSP430 MCUs that have at least two USCI modules.
The firmware creates two 100-bytes buffer to hold the data in the conversion. After the data is stored in the buffer, the next conversion is performed. Therefore, the maximum number of bytes sent in a single transmission cannot exceed 100 bytes (including the frame header). If you require packets larger than 100 bytes of data in single transmission, modify the two parameters I2C_TO_UART_BUFF_SIZE and UART_TO_I2C_BUFF_SIZE in the firmware to meet the requirements.
Interface | Maximum Rate |
---|---|
I2C | 400-kHz bit clock |
UART | 921600-bps baud rate |
To change the baud rate of the UART interface or the clock frequency of the I2C interface, change the UCA0BRW or UCB0BRW register in the code. In this application, SMCLK operates at 16 MHz. To change this, see the MSP430FR4xx and MSP430FR2xx Family User's Guide for the proper configuration and the MSP430FR231x Mixed-Signal Microcontrollers datasheet for the maximum I2C clock value. After making these changes, close the serial terminal, rebuild the code, reprogram and reset the MCU, and then reopen the terminal with the new baud rate.
The I2C clock speed and the UART baud rate can also be changed using UART commands (see Section 3 and Section 4). When the baud rate of the UART or the clock frequency of the I2C is changed by the UART, the change takes effect immediately and is saved after power off and restart.
To reduce power consumption while the MCU is not receiving or transmitting data, LPM0 is used. Other low-power modes can achieve lower power consumption, but they might require an external crystal oscillator and can limit the maximum baud rate due to increased wake-up times.