diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-16 20:59:21 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-16 20:59:21 +0000 |
commit | 2286099a155d9acd808665a1a86c382f3be8466e (patch) | |
tree | 13ef18c9305fc93f54bea5baabd4547c42ea8ba6 /nuttx/arch/arm | |
parent | 1427e505419d4b4ccdeb1ba2886ba128041de244 (diff) | |
download | px4-firmware-2286099a155d9acd808665a1a86c382f3be8466e.tar.gz px4-firmware-2286099a155d9acd808665a1a86c382f3be8466e.tar.bz2 px4-firmware-2286099a155d9acd808665a1a86c382f3be8466e.zip |
Updates to the PIC32 USB driver (still kind of buggy); Fix for STM32 CAN2 -- Need to enable CAN1 clocking to use CAN2
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4493 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c | 4 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32f20xxx_rcc.c | 6 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c index cacc8f889..f7f6c20b7 100644 --- a/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c +++ b/nuttx/arch/arm/src/stm32/stm32f10xxx_rcc.c @@ -287,9 +287,9 @@ static inline void rcc_enableapb1(void) #endif #ifdef CONFIG_STM32_CAN2 - /* CAN2 clock enable */ + /* CAN2 clock enable. NOTE: CAN2 needs CAN1 clock as well. */ - regval |= RCC_APB1ENR_CAN2EN; + regval |= (RCC_APB1ENR_CAN1EN | RCC_APB1ENR_CAN2EN); #endif #ifdef CONFIG_STM32_BKP diff --git a/nuttx/arch/arm/src/stm32/stm32f20xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f20xxx_rcc.c index 984955d4d..eee558f41 100644 --- a/nuttx/arch/arm/src/stm32/stm32f20xxx_rcc.c +++ b/nuttx/arch/arm/src/stm32/stm32f20xxx_rcc.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/stm32/stm32f20xxx_rcc.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -420,9 +420,9 @@ static inline void rcc_enableapb1(void) #endif #if CONFIG_STM32_CAN2 - /* CAN 2 clock enable */ + /* CAN2 clock enable. NOTE: CAN2 needs CAN1 clock as well. */ - regval |= RCC_APB1ENR_CAN2EN; + regval |= (RCC_APB1ENR_CAN1EN | RCC_APB1ENR_CAN2EN); #endif /* Power interface clock enable. The PWR block is always enabled so that diff --git a/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c b/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c index 53797ef45..3575f419e 100644 --- a/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c +++ b/nuttx/arch/arm/src/stm32/stm32f40xxx_rcc.c @@ -420,9 +420,9 @@ static inline void rcc_enableapb1(void) #endif #ifdef CONFIG_STM32_CAN2 - /* CAN 2 clock enable */ + /* CAN2 clock enable. NOTE: CAN2 needs CAN1 clock as well. */ - regval |= RCC_APB1ENR_CAN2EN; + regval |= (RCC_APB1ENR_CAN1EN | RCC_APB1ENR_CAN2EN); #endif /* Power interface clock enable. The PWR block is always enabled so that |