Kévin Redon | 4cd3f7d | 2019-01-24 17:57:13 +0100 | [diff] [blame] | 1 | The USART Synchronous Driver |
| 2 | ============================ |
| 3 | |
| 4 | The universal synchronous and asynchronous receiver and transmitter |
| 5 | (USART) is usually used to transfer data from one device to the other. |
| 6 | |
| 7 | User can set action for flow control pins by function usart_set_flow_control, |
| 8 | if the flow control is enabled. All the available states are defined in union |
| 9 | usart_flow_control_state. |
| 10 | |
| 11 | Note that user can set state of flow control pins only if automatic support of |
| 12 | the flow control is not supported by the hardware. |
| 13 | |
| 14 | Features |
| 15 | -------- |
| 16 | |
| 17 | * Initialization/de-initialization |
| 18 | * Enabling/disabling |
| 19 | * Control of the following settings: |
| 20 | |
| 21 | * Baudrate |
| 22 | * UART or USRT communication mode |
| 23 | * Character size |
| 24 | * Data order |
| 25 | * Flow control |
| 26 | * Data transfer: transmission, reception |
| 27 | |
| 28 | Applications |
| 29 | ------------ |
| 30 | |
| 31 | They are commonly used in a terminal application or low-speed communication |
| 32 | between devices. |
| 33 | |
| 34 | Dependencies |
| 35 | ------------ |
| 36 | |
| 37 | USART capable hardware. |
| 38 | |
| 39 | Concurrency |
| 40 | ----------- |
| 41 | |
| 42 | Write buffer should not be changed while data is being sent. |
| 43 | |
| 44 | |
| 45 | Limitations |
| 46 | ----------- |
| 47 | |
| 48 | * The driver does not support 9-bit character size. |
| 49 | * The "USART with ISO7816" mode can be only used in ISO7816 capable devices. |
| 50 | And the SCK pin can't be set directly. Application can use a GCLK output PIN |
| 51 | to generate SCK. For example to communicate with a SMARTCARD with ISO7816 |
| 52 | (F = 372 ; D = 1), and baudrate=9600, the SCK pin output frequency should be |
| 53 | config as 372*9600=3571200Hz. More information can be refer to ISO7816 Specification. |
| 54 | |
| 55 | Known issues and workarounds |
| 56 | ---------------------------- |
| 57 | |
| 58 | N/A |