summaryrefslogtreecommitdiff
path: root/src/stm/ao_serial_stm.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-04-09 22:17:33 -0700
committerKeith Packard <keithp@keithp.com>2012-04-09 22:17:33 -0700
commit51aef5d4fc29986353ad887f4a67ed2fe35f8c8e (patch)
tree537602d5a0ed6fdae7e4ce8830f3c24a4a87aca5 /src/stm/ao_serial_stm.c
parent1dcfbb05531767e67df45c2799a2fe533834fb71 (diff)
altos: Make STM clock configuration per-product. Fix 32MHz CPU speed
This moves all of the STM clock configuration into ao_pins.h so that each product can configure it separately. While doing this, I discovered that the flash memory mode (64-bit, prefetch, latency 1) wasn't actually getting set, which is why the CPU refused to work at 32MHz. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_serial_stm.c')
-rw-r--r--src/stm/ao_serial_stm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stm/ao_serial_stm.c b/src/stm/ao_serial_stm.c
index f8db6883..3cebc094 100644
--- a/src/stm/ao_serial_stm.c
+++ b/src/stm/ao_serial_stm.c
@@ -116,16 +116,16 @@ static const struct {
uint32_t brr;
} ao_usart_speeds[] = {
[AO_SERIAL_SPEED_4800] = {
- STM_APB1 / 4800
+ AO_PCLK1 / 4800
},
[AO_SERIAL_SPEED_9600] = {
- STM_APB1 / 9600
+ AO_PCLK1 / 9600
},
[AO_SERIAL_SPEED_19200] = {
- STM_APB1 / 19200
+ AO_PCLK1 / 19200
},
[AO_SERIAL_SPEED_57600] = {
- STM_APB1 / 57600
+ AO_PCLK1 / 57600
},
};