aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-01-17 14:55:12 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-01-17 14:55:12 +0000
commitc953aa5ac86e4f913c41333a773a0903e0860d35 (patch)
treed2c00d4f0eaf25892e5d4f4ade85b2866e2c38de /os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c
parentdf330879bb5c5630e847e2e9eec471080b0d18a4 (diff)
downloadChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.tar.gz
ChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.tar.bz2
ChibiOS-c953aa5ac86e4f913c41333a773a0903e0860d35.zip
Defaulted all STM32 drivers to enable peripheral clocks during stop/sleep modes. Now RCC macros are able to set or clear the LP bit of a peripheral.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11300 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c')
-rw-r--r--os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c b/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c
index 31c1bf480..c9130327a 100644
--- a/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c
+++ b/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c
@@ -92,7 +92,7 @@ static void can_lld_set_filters(CANDriver* canp,
/* Temporarily enabling CAN clock.*/
#if STM32_CAN_USE_CAN1
if(canp == &CAND1) {
- rccEnableCAN1(false);
+ rccEnableCAN1(true);
/* Filters initialization.*/
canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | CAN_FMR_FINIT;
canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | (can2sb << 8) | CAN_FMR_FINIT;
@@ -101,7 +101,7 @@ static void can_lld_set_filters(CANDriver* canp,
#if STM32_CAN_USE_CAN3
if(canp == &CAND3) {
- rccEnableCAN3(false);
+ rccEnableCAN3(true);
/* Filters initialization.*/
canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | CAN_FMR_FINIT;
}
@@ -682,7 +682,7 @@ void can_lld_start(CANDriver *canp) {
/* Clock activation.*/
#if STM32_CAN_USE_CAN1
if (&CAND1 == canp) {
- rccEnableCAN1(false);
+ rccEnableCAN1(true);
}
#endif
@@ -691,13 +691,13 @@ void can_lld_start(CANDriver *canp) {
osalDbgAssert(CAND1.state != CAN_STOP, "CAN1 must be started");
- rccEnableCAN2(false);
+ rccEnableCAN2(true);
}
#endif
#if STM32_CAN_USE_CAN3
if (&CAND3 == canp) {
- rccEnableCAN3(false);
+ rccEnableCAN3(true);
}
#endif