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 f56f7f137..4d4e76aff 100644 --- a/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c +++ b/os/hal/ports/STM32/LLD/CANv1/hal_can_lld.c @@ -657,11 +657,13 @@ void can_lld_init(void) { #endif /* Filters initialization.*/ +#if STM32_CAN_USE_CAN1 #if STM32_HAS_CAN2 can_lld_set_filters(&CAND1, STM32_CAN_MAX_FILTERS / 2, 0, NULL); #else can_lld_set_filters(&CAND1, STM32_CAN_MAX_FILTERS, 0, NULL); #endif +#endif #if STM32_HAS_CAN3 #if STM32_CAN_USE_CAN3 diff --git a/readme.txt b/readme.txt index f465d2ef7..d3b7ce8be 100644 --- a/readme.txt +++ b/readme.txt @@ -132,6 +132,8 @@ - HAL: Added a new interface for range-finder devices (used by EX). - HAL: Added mcuconf.h updater tool for STM32F407 (backported to 19.1.1). - NIL: Integrated NIL 4.0. +- FIX: Fixed STM32 CANv1 compile fails if CAN3 is used alone (bug #1052) + (backported to 19.1.4)(backported to 18.2.3). - FIX: Fixed palIsLineEventEnabledX() compile fail on STM32L4 (bug #1051) (backported to 19.1.4). - FIX: Fixed wrong clock disable check in STM32 DACv1 driver (bug #1050)