diff options
author | Keith Packard <keithp@keithp.com> | 2015-01-25 19:35:19 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-01-25 19:35:19 -0800 |
commit | df881bce8576f091b2d8cb53b8ce8a43aeedecde (patch) | |
tree | 5ee730fc6822f0c5755525212139a709c3a98341 /src/stmf0/ao_timer.c | |
parent | 02e1058fa52ee7c867ea6c9031ebb9e21d14889c (diff) |
altos: Add self-flash support for STM32F042 processor
Also moves the usual address for applications out of the way of the
flash loader.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stmf0/ao_timer.c')
-rw-r--r-- | src/stmf0/ao_timer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stmf0/ao_timer.c b/src/stmf0/ao_timer.c index 82a4cad6..3aae7e55 100644 --- a/src/stmf0/ao_timer.c +++ b/src/stmf0/ao_timer.c @@ -247,6 +247,10 @@ ao_clock_init(void) /* Clear reset flags */ stm_rcc.csr |= (1 << STM_RCC_CSR_RMVF); +#if !AO_HSI && !AO_NEED_HSI + /* Turn off the HSI clock */ + stm_rcc.cr &= ~(1 << STM_RCC_CR_HSION); +#endif #if DEBUG_THE_CLOCK /* Output SYSCLK on PA8 for measurments */ |