summaryrefslogtreecommitdiff
path: root/src/stm/ao_spi_stm.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-04-09 00:06:35 -0700
committerKeith Packard <keithp@keithp.com>2012-04-09 00:06:35 -0700
commite027247a9ef82746c26bcb8d0a851a0fa06511de (patch)
treeabf5cc7dd39fc2f725c033c6492999d17aa353bd /src/stm/ao_spi_stm.c
parent059f09dbca4703c25b42389b54c6510331c39485 (diff)
altos: Slow STM SPI down a bit so the MS5607 returns values
It's still not working right, but at least it returns something other than all zeros... Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_spi_stm.c')
-rw-r--r--src/stm/ao_spi_stm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm/ao_spi_stm.c b/src/stm/ao_spi_stm.c
index ecf7934f..d3e1ca4b 100644
--- a/src/stm/ao_spi_stm.c
+++ b/src/stm/ao_spi_stm.c
@@ -167,9 +167,9 @@ ao_spi_get(uint8_t spi_index)
(0 << STM_SPI_CR1_RXONLY) |
(1 << STM_SPI_CR1_SSM) | /* Software SS handling */
(1 << STM_SPI_CR1_SSI) | /* ... */
- (0 << STM_SPI_CR1_LSBFIRST) | /* Little endian */
+ (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_16 << 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));