1# MCP25XXFD CAN configuration options
2
3# Copyright (c) 2020 Abram Early
4# Copyright (c) 2023 Andriy Gelman
5# SPDX-License-Identifier: Apache-2.0
6
7config CAN_MCP251XFD
8	bool "MCP25XXFD CAN Driver"
9	default y
10	depends on DT_HAS_MICROCHIP_MCP251XFD_ENABLED
11	select CRC
12	select SPI
13	help
14	  Enable MCP25XXFD CAN Driver
15
16if CAN_MCP251XFD
17
18config CAN_MCP251XFD_MAX_TX_QUEUE
19	int "Maximum number of queued messages"
20	default 8
21	range 1 32
22	help
23	  Defines the array size of transmit callback pointers and semaphores,
24	  as well as the number of messages in the TX queue.
25
26config CAN_MCP251XFD_RX_FIFO_ITEMS
27	int "Number of CAN messages in the RX fifo"
28	default 16
29	range 1 32
30	help
31	  Defines the number of CAN messages in the RX fifo.
32
33config CAN_MCP251XFD_INT_THREAD_STACK_SIZE
34	int "Stack size for interrupt handler"
35	default 768
36	help
37	  Size of the stack used for internal thread which is ran for
38	  interrupt handling and incoming packets.
39
40config CAN_MCP251XFD_INT_THREAD_PRIO
41	int "Priority for interrupt handler"
42	default 2
43	help
44	  Thread priority of the interrupt handler. A higher number implies a
45	  higher priority. The thread is cooperative and will not be interrupted by
46	  another thread until execution is released.
47
48config CAN_MCP251XFD_READ_CRC_RETRIES
49	int "Number of retries during SFR register read"
50	default 5
51	help
52	  Number of retries during SFR register read if CRC fails.
53
54config CAN_MAX_FILTER
55	int "Maximum number of concurrent active filters"
56	default 5
57	range 1 31
58	help
59	  Maximum number of filters supported by the can_add_rx_callback() API call.
60
61endif # CAN_MCP251XFD
62