I/O Stream EUSART
I/O Stream EUSART.
The Enhanced Universal Synchronous / Asynchronous Receiver / Transmitter controller(s) (EUSART) can be used as a UART and can, therefore, be connected to an external transceiver to communicate with another host using the serial link. Multiple instances can be instantiated as long as they are bound to a unique EUSART peripheral. The flow control is supported as well.
The stream sets itself as the default stream at the end of the initialization function.You must reconfigure the default interface if you have multiple streams in your project else the last stream initialized will be set as the system default stream.
Power manager integration
On transmission side, I/O Stream-EUSART adds a requirement on EM1 or EM2, depending on the frequency mode, until the transmit is really completed. Once the transmit is completed the requirement is removed and the system can go to a lower energy mode if allowed.
On the receive side, a requirement on EM1 or EM2, depending on the frequency mode, is added if the application can receive data asynchronously. Meaning that the system can receive data when the MCU is in sleep mode (EM1 or EM2 to allow the reception). Allowing the reception in sleep mode will obviously increase the power consumption. Otherwise, If the system doesn't expect to receive anything, no requirement is added and the system can go to the lowest Energy mode allowed. You can control this behavior using a configuration per instance, see the following configuration:
|Struct representing an I/O Stream EUSART configuration. |
|Struct representing an I/O Stream EUSART context. |
|sl_status_t||sl_iostream_eusart_init (sl_iostream_uart_t *iostream_uart, sl_iostream_uart_config_t *uart_config, EUSART_UartInit_TypeDef *init, sl_iostream_eusart_config_t *eusart_config, sl_iostream_eusart_context_t *eusart_context)|
|EUSART Stream init. |
|void||sl_iostream_eusart_irq_handler (sl_iostream_uart_t *iostream_uart)|
|EUSART interrupt handler. |
|sl_status_t sl_iostream_eusart_init||(||sl_iostream_uart_t *||
EUSART Stream init.
I/O Stream UART handle. [in]
I/O Stream UART config. [in]
UART initialization modes. [in]
EUSART configuration. [in]
EUSART Instance context.
- Status result
|void sl_iostream_eusart_irq_handler||(||sl_iostream_uart_t *||)|
EUSART interrupt handler.
I/O Stream UART handle.