Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | # ISO-TP configuration options # Copyright (c) 2019 Alexander Wachter # SPDX-License-Identifier: Apache-2.0 menuconfig ISOTP bool "ISO-TP Transport [EXPERIMENTAL]" select NET_BUF select POLL select EXPERIMENTAL help Enable ISO TP support for CAN if ISOTP module = ISOTP module-str = ISOTP source "subsys/logging/Kconfig.template.log_config" config ISOTP_WFTMAX int "WFTmax (Max WAIT frames before aborting)." default 10 range 0 254 help This value defines the maximum number of WAIT frames before the transmission is aborted. config ISOTP_BS_TIMEOUT int "Bs timeout [ms] (timeout for receiving the frame control)" default 1000 range 200 10000 help Timeout for the reception of the next FC frame. ISO 15765-2: 1000ms config ISOTP_A_TIMEOUT int "Ar and As timeout [ms] (sending and receiving timeout)" default 1000 range 200 10000 help As (sender transmit timeout) and Ar (receiver transmit timeout). ISO 15765-2: 1000ms config ISOTP_CR_TIMEOUT int "Cr timeout [ms] (timeout for consecutive frames)" default 1000 range 200 10000 help Cr (receiver consecutive frame) timeout. ISO 15765-2: 1000ms config ISOTP_REQUIRE_RX_PADDING bool "Require padding for received messages" help If enabled, SFs and the last CF must always have a DLC of 8 bytes (for classic CAN) and unused bytes must be padded by the sending device. This setting allows to be compliant to AUTOSAR Specification of CAN Transport Layer. By default, received CAN frames with or without padding are accepted. config ISOTP_ENABLE_TX_PADDING bool "Padding for transmitted messages" help Add padding bytes 0xCC (as recommended by Bosch) if the PDU payload does not fit exactly into the CAN frame. config ISOTP_RX_BUF_COUNT int "Number of data buffers for receiving data" default 4 help Each data buffer will occupy ISOTP_RX_BUF_SIZE + smallish header (sizeof(struct net_buf)) amount of data. config ISOTP_RX_BUF_SIZE int "Size of one buffer data block" default 56 help This value defines the size of a single block in the pool. The number of blocks is given by ISOTP_RX_BUF_COUNT. To be efficient use a multiple of CAN_DL - 1 (for classic can : 8 - 1 = 7). config ISOTP_RX_SF_FF_BUF_COUNT int "Number of SF and FF data buffers for receiving data" default 4 help This buffer is used for first and single frames. It is extra because the buffer has to be ready for the first reception in isr context and therefor is allocated when binding. Each buffer will occupy CAN_DL - 1 byte + header (sizeof(struct net_buf)) amount of data. config ISOTP_USE_TX_BUF bool "Buffer tx writes" help Copy the outgoing data to a net buffer so that the calling function can discard the data. if ISOTP_USE_TX_BUF config ISOTP_TX_BUF_COUNT int "Number of data buffers for sending data" default 4 help Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish header (sizeof(struct net_buf)) amount of data. If context buffers are used, use the same size here. config ISOTP_BUF_TX_DATA_POOL_SIZE int "Size of the memory pool where buffers are allocated from" default 256 help This value defines the size of the memory pool where the buffers for sending are allocated from. endif # ISOTP_USE_TX_BUF config ISOTP_ENABLE_CONTEXT_BUFFERS bool "Buffered tx contexts" default y help This option enables buffered sending contexts. This makes send and forget possible. A memory slab is used to buffer the context. config ISOTP_TX_CONTEXT_BUF_COUNT int "Amount of context buffers for sending data" default 4 depends on ISOTP_ENABLE_CONTEXT_BUFFERS help This defines the size of the memory slab where the buffers are allocated from. endif # ISOTP |