summaryrefslogtreecommitdiff
path: root/docs/ws2812_driver.md
diff options
context:
space:
mode:
authorXelus22 <17491233+Xelus22@users.noreply.github.com>2021-03-19 08:29:18 +0000
committerGitHub <noreply@github.com>2021-03-19 19:29:18 +1100
commit6f7466b6dd72e161b61683e26b7720421d8cc9bd (patch)
tree7cbe7eb4a049fc57eb3c3e71e6c8f5397d49e2fc /docs/ws2812_driver.md
parentf2715a05939b749771d9826f9ad23b4cab280e82 (diff)
ARM WS2812 SPI config (baudrate and circular buffer) (#12216)
* initial commit * include circular buffer command * add endif * circular buffer mode * remove untrue comment * revamp and add documentation * do not allow WS2812_SPI_SYNC & CIRCULAR_BUFFER
Diffstat (limited to 'docs/ws2812_driver.md')
-rw-r--r--docs/ws2812_driver.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index fa14f02fdb..e69400364c 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -77,6 +77,25 @@ Configure the hardware via your config.h:
You must also turn on the SPI feature in your halconf.h and mcuconf.h
+#### Circular Buffer Mode
+Some boards may flicker while in the normal buffer mode. To fix this issue, circular buffer mode may be used to rectify the issue.
+
+By default, the circular buffer mode is disabled.
+
+To enable this alternative buffer mode, place this into your `config.h` file:
+```c
+#define WS2812_SPI_USE_CIRCULAR_BUFFER
+```
+
+#### Setting baudrate with divisor
+To adjust the baudrate at which the SPI peripheral is configured, users will need to derive the target baudrate from the clock tree provided by STM32CubeMX.
+
+Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported by hardware.
+
+|Define |Default|Description |
+|--------------------|-------|-------------------------------------|
+|`WS2812_SPI_DIVISOR`|`16` |SPI source clock peripheral divisor |
+
#### Testing Notes
While not an exhaustive list, the following table provides the scenarios that have been partially validated: