diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-02-22 00:26:49 +0000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-02-22 00:26:49 +0000 |
| commit | 77fc276c08b59d67779b726668d0b377c8ef47f0 (patch) | |
| tree | 1d614dfa6d480fdb6ab21b801c02f41cd9ad62fe /docs/library | |
| parent | e06cf89f04b3258d5dfb3849e7f2eeb359a65547 (diff) | |
stmhal: For UART, check that baudrate is within 5% of desired value.
Also includes documentation about minimum baudrate.
Addresses issue #1090.
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/pyb.UART.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/library/pyb.UART.rst b/docs/library/pyb.UART.rst index 257a9f281..509ca4080 100644 --- a/docs/library/pyb.UART.rst +++ b/docs/library/pyb.UART.rst @@ -75,6 +75,13 @@ Methods - ``timeout_char`` is the timeout in milliseconds to wait between characters. - ``read_buf_len`` is the character length of the read buffer (0 to disable). + This method will raise an exception if the baudrate could not be set within + 5% of the desired value. The minimum baudrate is dictated by the frequency + of the bus that the UART is on; UART(1) and UART(6) are APB2, the rest are on + APB1. The default bus frequencies give a minimum baudrate of 1300 for + UART(1) and UART(6) and 650 for the others. Use :func:`pyb.freq <pyb.freq>` + to reduce the bus frequencies to get lower baudrates. + *Note:* with parity=None, only 8 and 9 bits are supported. With parity enabled, only 7 and 8 bits are supported. |
