altos: Increase STM SPI speed to PCLK/4
authorKeith Packard <keithp@keithp.com>
Tue, 10 Apr 2012 05:24:36 +0000 (22:24 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 10 Apr 2012 05:24:36 +0000 (22:24 -0700)
The pressure sensor seems happy at this speed.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_spi_stm.c

index d3e1ca4b48e9823b26344d7cdb7302201ca64481..be24ebcfd1446cc16f51dbceebe96d6cd0f17b81 100644 (file)
@@ -169,7 +169,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_16 << STM_SPI_CR1_BR) |    /* baud rate to pclk/4 */
+                       (STM_SPI_CR1_BR_PCLK_4 << 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));