2021-02-12 03:07:04 +08:00
|
|
|
# STM32 CAN configuration options
|
2021-02-07 22:47:52 +08:00
|
|
|
|
|
|
|
# Copyright (c) 2020 Alexander Wachter
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
DT_COMPAT_STM32_FDCAN := st,stm32-fdcan
|
2021-02-12 03:07:04 +08:00
|
|
|
|
|
|
|
config CAN_STM32FD
|
2021-02-07 22:47:52 +08:00
|
|
|
bool "STM32 FDCAN driver"
|
|
|
|
default $(dt_compat_enabled,$(DT_COMPAT_STM32_FDCAN))
|
|
|
|
select CAN_MCAN
|
|
|
|
select USE_STM32_LL_RCC
|
|
|
|
|
|
|
|
if CAN_STM32FD
|
2021-02-12 03:07:04 +08:00
|
|
|
|
|
|
|
config CAN_MAX_STD_ID_FILTER
|
|
|
|
int "Maximum number of std ID filters"
|
|
|
|
default 28
|
|
|
|
range 0 28
|
|
|
|
help
|
|
|
|
Defines the maximum number of filters with standard ID (11-bit)
|
|
|
|
that can be attached.
|
|
|
|
|
|
|
|
config CAN_MAX_EXT_ID_FILTER
|
|
|
|
int "Maximum number of ext ID filters"
|
|
|
|
default 8
|
|
|
|
range 0 8
|
|
|
|
help
|
|
|
|
Defines the maximum number of filters with extended ID (29-bit)
|
|
|
|
that can be attached.
|
|
|
|
|
2021-02-07 22:47:52 +08:00
|
|
|
config CAN_STM32_CLOCK_DIVISOR
|
|
|
|
int "CAN clock divisor"
|
|
|
|
range 1 30
|
|
|
|
default 1
|
2021-02-12 03:07:04 +08:00
|
|
|
help
|
2021-02-07 22:47:52 +08:00
|
|
|
The APB clock is divided by this value (stored in CKDIV register)
|
|
|
|
before it is fed to the CAN core.
|
|
|
|
Note that the the divisor affects all CAN controllers.
|
|
|
|
Allowed values: 1 or 2 * n, where n <= 15.
|
2021-02-12 03:07:04 +08:00
|
|
|
|
2021-02-07 22:47:52 +08:00
|
|
|
endif #CAN_STM32FD
|