Skip to content

Using USART and UART

xoviat edited this page Sep 16, 2023 · 4 revisions

In addition to the standard serial configuration, clocks, and interrupt name, the specific DMA streams must also be known. The DMA streams can be found in the MCU's reference manual under the DMAn request mapping. The stream configuration is type checked.

See the f4 serial example for an example construction.

Reading

To read from the USART, the receive method returns a future that completes when one of the following occurs:

  1. The passed buffer becomes full.
  2. The USART falls idle after receiving some data.
  3. An error occurs.

Writing

The transmit method returns a future when one of the following occurs:

  1. the provided buffer is fully transmitted.
  2. an error occurs.

Test edit.

Clone this wiki locally