Skip to content

Commit 84ec09f

Browse files
committed
boards/nucleo-l432kc: add configuration CAN peripheral
Signed-off-by: Didier DONSEZ <[email protected]>
1 parent b469a52 commit 84ec09f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

boards/nucleo-l432kc/Makefile.features

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CPU = stm32
22
CPU_MODEL = stm32l432kc
33

44
# Put defined MCU peripherals here (in alphabetical order)
5+
FEATURES_PROVIDED += periph_can
56
FEATURES_PROVIDED += periph_i2c
67
FEATURES_PROVIDED += periph_pwm
78
FEATURES_PROVIDED += periph_rtc

cpu/stm32/include/can_params.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ static const can_conf_t candev_conf[] = {
5454
.rx_pin = GPIO_PIN(PORT_A, 11),
5555
.tx_pin = GPIO_PIN(PORT_A, 12),
5656
#elif defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32F4)
57+
58+
#if defined(CPU_MODEL_STM32L432KC)
59+
.rx_pin = GPIO_PIN(PORT_A, 11),
60+
.tx_pin = GPIO_PIN(PORT_A, 12),
61+
.af = GPIO_AF9,
62+
#else
5763
.rx_pin = GPIO_PIN(PORT_B, 8),
5864
.tx_pin = GPIO_PIN(PORT_B, 9),
5965
.af = GPIO_AF9,
66+
#endif
6067
#else
6168
.rx_pin = GPIO_PIN(PORT_D, 0),
6269
.tx_pin = GPIO_PIN(PORT_D, 1),

0 commit comments

Comments
 (0)