From 51aef5d4fc29986353ad887f4a67ed2fe35f8c8e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 9 Apr 2012 22:17:33 -0700 Subject: 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 --- src/stm/ao_serial_stm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/stm/ao_serial_stm.c') 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 }, }; -- cgit v1.2.3