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

 

  1.   Trademarks
  2. 1Introduction
  3. 2Implementation
  4. 3UART Message Format
    1. 3.1 Write N Bytes to Slave Device
    2. 3.2 Read N Bytes From Slave Device
    3. 3.3 Repeated Start (Read After Write)
    4. 3.4 Repeated Start (Write After Write)
    5. 3.5 Write to Internal Register
    6. 3.6 Read From Internal Register
  5. 4Internal Registers Available
    1. 4.1 Register Summary
    2. 4.2 Baud Rate Generator (BRG)
    3. 4.3 I2C Bus Clock Rates (I2CClk)
  6. 5Performance
  7. 6Application Examples
    1. 6.1 Test With I2C Slave Device
    2. 6.2 Read and Write EEPROM
  8. 7Reference
  9. 8Revision History

Performance

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.

Table 5-1 Maximum Rates
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.