From 2848e99c07e4174412dd0879046b9c3f82961695 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 6 Nov 2011 12:25:34 +0000 Subject: STM32F4 support working, most device drivers still to test, report added. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3475 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/serial_lld.c | 4 ++++ os/hal/platforms/STM32F4xx/hal_lld.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'os/hal/platforms') diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c index ce412dedb..d9d0836fd 100644 --- a/os/hal/platforms/STM32/serial_lld.c +++ b/os/hal/platforms/STM32/serial_lld.c @@ -90,7 +90,11 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) { /* * Baud rate setting. */ +#if STM32_HAS_USART6 + if ((sdp->usart == USART1) || (sdp->usart == USART6)) +#else if (sdp->usart == USART1) +#endif u->BRR = STM32_PCLK2 / config->sc_speed; else u->BRR = STM32_PCLK1 / config->sc_speed; diff --git a/os/hal/platforms/STM32F4xx/hal_lld.c b/os/hal/platforms/STM32F4xx/hal_lld.c index bd88ad2da..5033c41c8 100644 --- a/os/hal/platforms/STM32F4xx/hal_lld.c +++ b/os/hal/platforms/STM32F4xx/hal_lld.c @@ -142,7 +142,8 @@ void stm32_clock_init(void) { STM32_RTCPRE | STM32_PPRE2 | STM32_PPRE1 | STM32_HPRE; /* Flash setup.*/ - FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | STM32_FLASHBITS; + FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | + STM32_FLASHBITS; /* Switching to the configured clock source if it is different from MSI.*/ #if (STM32_SW != STM32_SW_HSI) -- cgit v1.2.3