Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

UART Example#

Overview#

This sample is a cross-loopback test for UART2 and UART3. It covers multiple baud rates, parity modes, stop-bit configurations, polling, buffer handling, and stress tests.

Source file: src/rtsmart/examples/peripheral/uart/test_uart.c

Default Pin Mapping#

  • UART2: TX=11, RX=12

  • UART3: TX=50, RX=51

Key APIs#

  • drv_uart_inst_create() / drv_uart_inst_destroy()

  • drv_uart_set_config() / drv_uart_get_config()

  • drv_uart_write() / drv_uart_read()

  • drv_uart_poll() / drv_uart_recv_available()

  • drv_uart_configure_buffer_size()

  • drv_fpioa_set_pin_func()

Build and Run#

cd src/rtsmart/examples/peripheral/uart
make
./test_uart

The sample has no command-line parameters.

Comments list
Comments
Log in