altos: Crank fast SPI on STM to 8MHz
authorKeith Packard <keithp@keithp.com>
Mon, 14 Jan 2013 04:50:10 +0000 (20:50 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 14 Jan 2013 04:54:14 +0000 (20:54 -0800)
With the GPIO pins set to 10MHz now, we can run SPI at the maximum
possible speed (8MHz).

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

index 87bbe73e3b926a6b964d181f6dc5a60926cb4305..d17793076f38ca177e60f66082288c607044d1b5 100644 (file)
@@ -23,7 +23,7 @@
 
 /* PCLK is set to 16MHz (HCLK 32MHz, APB prescaler 2) */
 
-#define AO_SPI_SPEED_8MHz      STM_SPI_CR1_BR_PCLK_2   /* This doesn't appear to work */
+#define AO_SPI_SPEED_8MHz      STM_SPI_CR1_BR_PCLK_2
 #define AO_SPI_SPEED_4MHz      STM_SPI_CR1_BR_PCLK_4
 #define AO_SPI_SPEED_2MHz      STM_SPI_CR1_BR_PCLK_8
 #define AO_SPI_SPEED_1MHz      STM_SPI_CR1_BR_PCLK_16
@@ -32,7 +32,7 @@
 #define AO_SPI_SPEED_125kHz    STM_SPI_CR1_BR_PCLK_128
 #define AO_SPI_SPEED_62500Hz   STM_SPI_CR1_BR_PCLK_256
 
-#define AO_SPI_SPEED_FAST      AO_SPI_SPEED_4MHz
+#define AO_SPI_SPEED_FAST      AO_SPI_SPEED_8MHz
 
 /* Companion bus wants something no faster than 200kHz */