From 06f11df2a929c1fe4e87135dcabfaca78299dff5 Mon Sep 17 00:00:00 2001 From: memeruiz Date: Tue, 14 Jan 2014 04:44:25 -0600 Subject: [PATCH] [stm32f3] fix DMA memory address and complete RCC enable definitions. --- include/libopencm3/stm32/f3/memorymap.h | 4 ++-- include/libopencm3/stm32/f3/rcc.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/libopencm3/stm32/f3/memorymap.h b/include/libopencm3/stm32/f3/memorymap.h index 07794952..44de7652 100644 --- a/include/libopencm3/stm32/f3/memorymap.h +++ b/include/libopencm3/stm32/f3/memorymap.h @@ -101,8 +101,8 @@ /* PERIPH_BASE_AHB1 + 0x1400 (0x4002 1400 - 0x4002 1FFF): Reserved */ #define RCC_BASE (PERIPH_BASE_AHB1 + 0x1000) /* PERIPH_BASE_AHB1 + 0x0800 (0x4002 0800 - 0x4002 0FFF): Reserved */ -#define DMA1_BASE (PERIPH_BASE_AHB1 + 0x6000) -#define DMA2_BASE (PERIPH_BASE_AHB1 + 0x6400) +#define DMA1_BASE (PERIPH_BASE_AHB1 + 0x0000) +#define DMA2_BASE (PERIPH_BASE_AHB1 + 0x0400) /* AHB3 */ diff --git a/include/libopencm3/stm32/f3/rcc.h b/include/libopencm3/stm32/f3/rcc.h index 9b2a4a67..ee9c9674 100644 --- a/include/libopencm3/stm32/f3/rcc.h +++ b/include/libopencm3/stm32/f3/rcc.h @@ -239,7 +239,11 @@ #define RCC_AHBENR_IOPCEN (1 << 19) #define RCC_AHBENR_IOPBEN (1 << 18) #define RCC_AHBENR_IOPAEN (1 << 17) -#define RCC_AHBENR_CRCEN (1 << 1) +#define RCC_AHBENR_CRCEN (1 << 6) +#define RCC_AHBENR_FLITFEN (1 << 4) +#define RCC_AHBENR_SRAMEN (1 << 2) +#define RCC_AHBENR_DMA2EN (1 << 1) +#define RCC_AHBENR_DMA1EN (1 << 0) /* --- RCC_APB2ENR values -------------------------------------------------- */ @@ -260,6 +264,9 @@ #define RCC_APB1ENR_USBEN (1 << 23) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) +#define RCC_APB1ENR_USART5EN (1 << 20) +#define RCC_APB1ENR_USART4EN (1 << 19) +#define RCC_APB1ENR_USART3EN (1 << 18) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI3EN (1 << 15) #define RCC_APB1ENR_SPI2EN (1 << 14)