1# CANopenNode CANopen protocol stack configuration options
2
3# Copyright (c) 2019 Vestas Wind Systems A/S
4# SPDX-License-Identifier: Apache-2.0
5
6config ZEPHYR_CANOPENNODE_MODULE
7	bool
8
9config CANOPENNODE
10	bool "CANopenNode support"
11	select CRC
12	depends on CAN && !CAN_FD_MODE
13	help
14	  This option enables the CANopenNode library.
15
16if CANOPENNODE
17
18config CANOPENNODE_SDO_BUFFER_SIZE
19	int "CANopen SDO buffer size"
20	default 32
21	range 7 889
22	help
23	  Size of the internal CANopen SDO buffer in bytes. Size must
24	  be at least equal to the size of the largest variable in the
25	  object dictionary. If data type is DOMAIN, data length is
26	  not limited to the SDO buffer size. If block transfer is
27	  implemented, value should be set to 889.
28
29config CANOPENNODE_TRACE_BUFFER_SIZE
30	int "CANopen trace buffer size"
31	default 100
32	help
33	  Size of the CANopen trace buffer in bytes.
34
35config CANOPENNODE_TX_WORKQUEUE_STACK_SIZE
36	int "Stack size for the CANopen transmit workqueue"
37	default 512
38	help
39	  Size of the stack used for the internal CANopen transmit
40	  workqueue.
41
42config CANOPENNODE_TX_WORKQUEUE_PRIORITY
43	int "Priority for CANopen transmit workqueue"
44	default 0 if !COOP_ENABLED
45	default -1
46	help
47	  Priority level of the internal CANopen transmit workqueue.
48
49config CANOPENNODE_STORAGE
50	bool "CANopen object dictionary storage"
51	depends on SETTINGS
52	default y
53	help
54	  Enable support for storing the CANopen object dictionary to
55	  non-volatile storage.
56
57config CANOPENNODE_STORAGE_HANDLER_ERASES_EEPROM
58	bool "Erase CANopen object dictionary EEPROM entries in storage handler"
59	depends on CANOPENNODE_STORAGE
60	help
61	  Erase CANopen object dictionary EEPROM entries upon write to
62	  object dictionary index 0x1011 subindex 1.
63
64config CANOPENNODE_LEDS
65	bool "CANopen LED indicators"
66	default y
67	help
68	  Enable support for CANopen LED indicators according to the CiA
69	  303-3 specification.
70
71config CANOPENNODE_LEDS_BICOLOR
72	bool "CANopen bicolor LED indicator"
73	depends on CANOPENNODE_LEDS
74	help
75	  Handle CANopen LEDs as one bicolor LED, favoring the red LED
76	  over the green LED in accordance with the CiA 303-3
77	  specification.
78
79config CANOPENNODE_SYNC_THREAD
80	bool "CANopen SYNC thread"
81	default y
82	help
83	  Enable internal thread for processing CANopen SYNC RPDOs and
84	  TPDOs. Application layer must take care of SYNC RPDO and
85	  TPDO processing on its own if this is disabled.
86
87config CANOPENNODE_SYNC_THREAD_STACK_SIZE
88	int "Stack size for the CANopen SYNC thread"
89	depends on CANOPENNODE_SYNC_THREAD
90	default 512
91	help
92	  Size of the stack used for the internal thread which
93	  processes CANopen SYNC RPDOs and TPDOs.
94
95config CANOPENNODE_SYNC_THREAD_PRIORITY
96	int "Priority for CANopen SYNC thread"
97	depends on CANOPENNODE_SYNC_THREAD
98	default 0 if !COOP_ENABLED
99	default -5
100	help
101	  Priority level of the internal thread which processes
102	  CANopen SYNC RPDOs and TPDOs.
103
104config CANOPENNODE_PROGRAM_DOWNLOAD
105	bool "CANopen program download"
106	depends on BOOTLOADER_MCUBOOT
107	select IMG_MANAGER
108	default y
109	help
110	  Enable support for program download over CANopen according
111	  to the CiA 302-3 (draft) specification.
112
113endif # CANOPENNODE
114