summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-06-15 22:41:17 -0700
committerKeith Packard <keithp@keithp.com>2012-06-15 22:41:17 -0700
commite856df474c386b8df3d2bd9e87b766ae0439efbf (patch)
treeb4a580854517a43f609b30f3c2e7a1e430c26de8
parente09e35471e788b88909ff01037fb8e0e4eabcd7d (diff)
altos: Reduce STM SPI data rate to 4MHz
cc1120 doesn't want more than 6.1MHz, otherwise it gets very angry. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/stm/ao_spi_stm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stm/ao_spi_stm.c b/src/stm/ao_spi_stm.c
index 8bb0d8e8..8784d985 100644
--- a/src/stm/ao_spi_stm.c
+++ b/src/stm/ao_spi_stm.c
@@ -282,7 +282,7 @@ ao_spi_get(uint8_t spi_index)
(1 << STM_SPI_CR1_SSI) | /* ... */
(0 << STM_SPI_CR1_LSBFIRST) | /* Big endian */
(1 << STM_SPI_CR1_SPE) | /* Enable SPI unit */
- (STM_SPI_CR1_BR_PCLK_4 << STM_SPI_CR1_BR) | /* baud rate to pclk/4 */
+ (STM_SPI_CR1_BR_PCLK_8 << STM_SPI_CR1_BR) | /* baud rate to pclk/4 */
(1 << STM_SPI_CR1_MSTR) |
(0 << STM_SPI_CR1_CPOL) | /* Format 0 */
(0 << STM_SPI_CR1_CPHA));