Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/nucleo-l432kc: enable CAN support #20845

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/nucleo-l432kc/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CPU = stm32
CPU_MODEL = stm32l432kc

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_can
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
Expand Down
7 changes: 7 additions & 0 deletions cpu/stm32/include/can_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ static const can_conf_t candev_conf[] = {
.rx_pin = GPIO_PIN(PORT_A, 11),
.tx_pin = GPIO_PIN(PORT_A, 12),
#elif defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32F4)

#if defined(CPU_MODEL_STM32L432KC)
.rx_pin = GPIO_PIN(PORT_A, 11),
.tx_pin = GPIO_PIN(PORT_A, 12),
benpicco marked this conversation as resolved.
Show resolved Hide resolved
.af = GPIO_AF9,
#else
.rx_pin = GPIO_PIN(PORT_B, 8),
.tx_pin = GPIO_PIN(PORT_B, 9),
.af = GPIO_AF9,
#endif
#else
.rx_pin = GPIO_PIN(PORT_D, 0),
.tx_pin = GPIO_PIN(PORT_D, 1),
Expand Down
Loading