diff options
Diffstat (limited to 'docs/serial_driver.md')
-rw-r--r-- | docs/serial_driver.md | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/docs/serial_driver.md b/docs/serial_driver.md index 395b3ec3f..bc376b6dd 100644 --- a/docs/serial_driver.md +++ b/docs/serial_driver.md | |||
@@ -1,7 +1,7 @@ | |||
1 | # 'serial' Driver | 1 | # 'serial' Driver |
2 | This driver powers the [Split Keyboard](feature_split_keyboard.md) feature. | 2 | This driver powers the [Split Keyboard](feature_split_keyboard.md) feature. |
3 | 3 | ||
4 | !> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards. | 4 | ?> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards. |
5 | 5 | ||
6 | All drivers in this category have the following characteristics: | 6 | All drivers in this category have the following characteristics: |
7 | * Provides data and signaling over a single conductor | 7 | * Provides data and signaling over a single conductor |
@@ -11,7 +11,7 @@ All drivers in this category have the following characteristics: | |||
11 | 11 | ||
12 | | | AVR | ARM | | 12 | | | AVR | ARM | |
13 | |-------------------|--------------------|--------------------| | 13 | |-------------------|--------------------|--------------------| |
14 | | bit bang | :heavy_check_mark: | Soon™ | | 14 | | bit bang | :heavy_check_mark: | :heavy_check_mark: | |
15 | | USART Half-duplex | | :heavy_check_mark: | | 15 | | USART Half-duplex | | :heavy_check_mark: | |
16 | 16 | ||
17 | ## Driver configuration | 17 | ## Driver configuration |
@@ -35,6 +35,12 @@ Configure the driver via your config.h: | |||
35 | // 5: about 20kbps | 35 | // 5: about 20kbps |
36 | ``` | 36 | ``` |
37 | 37 | ||
38 | #### ARM | ||
39 | |||
40 | !> The bitbang driver causes connection issues with bitbang WS2812 driver | ||
41 | |||
42 | Along with the generic options above, you must also turn on the `PAL_USE_CALLBACKS` feature in your halconf.h. | ||
43 | |||
38 | ### USART Half-duplex | 44 | ### USART Half-duplex |
39 | Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk: | 45 | Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk: |
40 | 46 | ||
@@ -56,4 +62,8 @@ Configure the hardware via your config.h: | |||
56 | #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 | 62 | #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 |
57 | ``` | 63 | ``` |
58 | 64 | ||
59 | You must also turn on the SERIAL feature in your halconf.h and mcuconf.h | 65 | You must also enable the ChibiOS `SERIAL` feature: |
66 | * In your board's halconf.h: `#define HAL_USE_SERIAL TRUE` | ||
67 | * In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU) | ||
68 | |||
69 | Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral. | ||