Home
last modified time | relevance | path

Searched full:can (Results 1 – 25 of 4278) sorted by relevance

12345678910>>...172

/Zephyr-latest/drivers/can/
DKconfig1 # CAN configuration options
7 # CAN options
9 menuconfig CAN config
10 bool "Controller Area Network (CAN) drivers"
12 Enable CAN Driver Configuration
14 if CAN
16 module = CAN
17 module-str = CAN
21 int "CAN driver init priority"
24 CAN driver device initialization priority.
[all …]
Dcan_stm32_bxcan.c8 /* Include soc.h prior to Zephyr CAN headers to pull in HAL fixups */
10 #include <zephyr/drivers/can.h>
11 #include <zephyr/drivers/can/transceiver.h>
66 CAN_TypeDef *can; /*!< CAN Registers*/ member
67 CAN_TypeDef *master_can; /*!< CAN Registers for shared filter */
69 void (*config_irq)(CAN_TypeDef *can);
118 CAN_TypeDef *can = cfg->can; in can_stm32_rx_isr_handler() local
125 while (can->RF0R & CAN_RF0R_FMP0) { in can_stm32_rx_isr_handler()
126 mbox = &can->sFIFOMailBox[0]; in can_stm32_rx_isr_handler()
147 can->RF0R |= CAN_RF0R_RFOM0; in can_stm32_rx_isr_handler()
[all …]
DKconfig.xmc4xxx1 # Infineon XMC4xxx CAN configuration options
6 bool "Infineon XMC4xxx CAN Driver"
11 Enable Infineon XMC4xxx CAN Driver
24 int "Number of CAN messages allocated to each RX FIFO"
28 Defines the number of CAN messages in each RX FIFO. A separate RX FIFO
35 Connects all XMC4XXX CAN devices to an internal bus. Enables
36 message exchange between MCU CAN devices without any external connectors.
/Zephyr-latest/doc/hardware/peripherals/can/
Dshell.rst3 CAN Shell
13 The CAN shell provides a ``can`` command with a set of subcommands for the :ref:`shell <shell_api>`
15 interface without having to write a dedicated application. The CAN shell can also be enabled in
16 existing applications to aid in interactive debugging of CAN issues.
18 The CAN shell provides access to most CAN controller features, including inspection, configuration,
19 sending and receiving of CAN frames, and bus recovery.
21 In order to enable the CAN shell, the following :ref:`Kconfig <kconfig>` options must be enabled:
28 ``can`` command:
30 * :kconfig:option:`CONFIG_CAN_FD_MODE` enables CAN FD specific subcommands (e.g. for setting the
31 timing for the CAN FD data phase).
[all …]
Dtransceiver.rst3 CAN Transceiver
13 A CAN transceiver is an external device that converts the logic level signals
14 from the CAN controller to the bus-levels. The bus lines are called
15 CAN High (CAN H) and CAN Low (CAN L).
16 The transmit wire from the controller to the transceiver is called CAN TX,
17 and the receive wire is called CAN RX.
19 differentially between CAN H and CAN L.
20 The bus can be either in the recessive (logical one) or dominant (logical zero)
21 state. The recessive state is when both lines, CAN H and CAN L, are roughly at
23 To write a dominant bit to the bus, open-drain transistors tie CAN H to Vdd
[all …]
/Zephyr-latest/tests/drivers/can/host/
DREADME.rst3 Controller Area Network (CAN) Host Tests
9 This test suite uses `python-can`_ for testing Controller Area Network (CAN) communication between a
17 * The python-can library installed on the host PC.
18 * A CAN fixture creating a CAN bus between the host PC and the DUT.
20 The Zephyr end of the CAN fixture can be configured as follows:
22 * The CAN controller to be used is set using the ``zephyr,canbus`` chosen devicetree node.
23 * The CAN bitrates are set using :kconfig:option:`CONFIG_CAN_DEFAULT_BITRATE` and
24 :kconfig:option:`CONFIG_CAN_DEFAULT_BITRATE_DATA`, but can be overridden on a board level using
25 the ``bitrate`` and ``bitrate-data`` CAN controller devicetree properties if needed. Default
26 bitrates are 125 kbits/s for the arbitration phase/CAN classic and 1 Mbit/s for the CAN FD data
[all …]
/Zephyr-latest/include/zephyr/devicetree/
Dcan.h3 * @brief CAN devicetree macro public API header file.
20 * @defgroup devicetree-can Devicetree CAN API
26 * @brief Get the minimum transceiver bitrate for a CAN controller
28 * The bitrate will be limited to the minimum bitrate supported by the CAN
29 * controller. If no CAN transceiver is present in the devicetree, the minimum
30 * bitrate will be that of the CAN controller.
34 * transceiver0: can-phy0 {
35 * compatible = "vnd,can-transceiver";
41 * can0: can@... {
42 * compatible = "vnd,can-controller";
[all …]
/Zephyr-latest/samples/net/sockets/can/
DREADME.rst1 .. zephyr:code-sample:: socket-can
5 Send and receive raw CAN frames using BSD sockets API.
10 The socket CAN sample is a server/client application that sends and receives
11 raw CAN frames using BSD socket API.
15 * Setup function which creates a CAN socket, binds it to a CAN network
16 interface, and then installs a CAN filter to the socket so that the
17 application can receive CAN frames.
18 * Receive function which starts to listen the CAN socket and prints
19 information about the CAN frames.
20 * Send function which starts to send raw CAN frames to the bus.
[all …]
/Zephyr-latest/samples/drivers/can/babbling/
DREADME.rst1 .. zephyr:code-sample:: can-babbling
2 :name: Controller Area Network (CAN) babbling node
5 Simulate a babbling CAN node.
11 transmitting CAN frames with identical - often high - priority. This constant babbling blocks CAN
12 bus access for any CAN frame with lower priority as these frames will loose the bus arbitration.
14 This sample application simulates a babbling CAN node. The properties of the CAN frames sent are
16 the CAN frame is of interest.
18 Being able to simulate a babbling CAN node is useful when examining the behavior of other nodes on
19 the same CAN bus when they constantly loose bus arbitration.
21 The source code for this sample application can be found at:
[all …]
DKconfig7 hex "CAN ID"
12 Babbling node CAN ID.
15 bool "Use Extended (29-bit) CAN ID"
17 Babling node sends extended (29-bit) CAN ID frames.
25 bool "Send CAN FD format frames"
28 Babbling node sends CAN FD format frames.
31 int "Maximum number of CAN frames to enqueue"
35 Maximum number of CAN frames to enqueue for transmission.
/Zephyr-latest/tests/drivers/can/api/src/
Dcommon.h9 #include <zephyr/drivers/can.h>
33 * @brief Standard (11-bit) CAN IDs and masks used for testing.
43 * @brief Extended (29-bit) CAN IDs and masks used for testing.
61 * @brief Standard (11-bit) CAN ID frame 1.
66 * @brief Standard (11-bit) CAN ID frame 2.
71 * @brief Extended (29-bit) CAN ID frame 1.
76 * @brief Extended (29-bit) CAN ID frame 1.
81 * @brief Standard (11-bit) CAN ID RTR frame 1.
86 * @brief Extended (29-bit) CAN ID RTR frame 1.
92 * @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
[all …]
Dcanfd.c8 #include <zephyr/drivers/can.h>
26 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_std_callback_1()
36 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_std_callback_2()
45 zassert_equal(dev, can_dev, "CAN device does not match"); in rx_std_callback_1()
56 zassert_equal(dev, can_dev, "CAN device does not match"); in rx_std_callback_2()
68 zassert_equal(dev, can_dev, "CAN device does not match"); in rx_std_callback_fd_1()
80 zassert_equal(dev, can_dev, "CAN device does not match"); in rx_std_callback_fd_2()
87 * @brief Send a CAN test frame with asserts.
93 * @param frame Pointer to the CAN frame to send.
105 * @brief Send a CAN test frame with asserts.
[all …]
Dclassic.c8 #include <zephyr/drivers/can.h>
21 * @brief Standard (11-bit) CAN ID transmit callback 1.
31 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_std_callback_1()
36 * @brief Standard (11-bit) CAN ID transmit callback 2.
46 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_std_callback_2()
51 * @brief Extended (29-bit) CAN ID transmit callback 1.
61 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_ext_callback_1()
66 * @brief Extended (29-bit) CAN ID transmit callback 2.
76 zassert_equal(dev, can_dev, "CAN device does not match"); in tx_ext_callback_2()
81 * @brief Standard (11-bit) CAN ID receive callback 1.
[all …]
Dcommon.c8 #include <zephyr/drivers/can.h>
26 * @brief Standard (11-bit) CAN ID frame 1.
36 * @brief Standard (11-bit) CAN ID frame 2.
46 * @brief Extended (29-bit) CAN ID frame 1.
56 * @brief Extended (29-bit) CAN ID frame 1.
66 * @brief Standard (11-bit) CAN ID RTR frame 1.
76 * @brief Extended (29-bit) CAN ID RTR frame 1.
87 * @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
101 * @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
116 * @brief Standard (11-bit) CAN ID filter 1. This filter matches
[all …]
/Zephyr-latest/tests/subsys/canbus/isotp/conformance/
Dtestcase.yaml6 # | 1 | Classical CAN only | CONFIG_CAN_FD_MODE=n | nucleo_f072 |
7 # | 2 | Classical CAN only | CONFIG_CAN_FD_MODE=y | nucleo_f072 |
8 # | 3 | Classical CAN + CAN FD | CONFIG_CAN_FD_MODE=n | native_sim |
9 # | 4 | Classical CAN + CAN FD | CONFIG_CAN_FD_MODE=y | native_sim |
12 # CAN FD independent of CONFIG_CAN_FD_MODE configuration.
19 - can
21 depends_on: can
26 - can
31 depends_on: can
36 - can
[all …]
/Zephyr-latest/dts/bindings/phy/
Dcan-transceiver-gpio.yaml4 description: Simple GPIO controlled CAN transceiver
6 compatible: "can-transceiver-gpio"
8 include: can-transceiver.yaml
14 GPIO to use to enable/disable the CAN transceiver. This GPIO is driven
15 active when the CAN transceiver is enabled and inactive when the CAN
21 GPIO to use to put the CAN transceiver into standby. This GPIO is driven
22 inactive when the CAN transceiver is enabled and active when the CAN
/Zephyr-latest/include/zephyr/drivers/
Dcan.h11 * @brief Controller Area Network (CAN) driver API.
31 * @brief CAN Interface
32 * @defgroup can_interface CAN Interface
40 * @name CAN frame definitions
45 * @brief Bit mask for a standard (11-bit) CAN identifier.
50 * @brief Bit mask for an extended (29-bit) CAN identifier.
55 * @brief Maximum data length code for CAN 2.0A/2.0B.
60 * @brief Maximum data length code for CAN FD.
79 * @name CAN controller mode flags
94 /** Controller allows transmitting/receiving CAN FD frames. */
[all …]
/Zephyr-latest/tests/drivers/can/timing/
DKconfig4 mainmenu "CAN timing test"
7 bool "Test all CAN in Automation (CiA) recommended bitrates"
9 Enable test of all bitrates recommended by CAN in Automation (CiA). Not all CAN
10 controllers can meet all of the bitrates listed below, and some board configurations may
11 impose limits on which bitrates can be met due to limitations in the CAN core clock
24 CiA 601-2 lists the following exemplary CAN FD data phase bitrates:
31 CiA 601-3 recommends the following CAN FD core clock frequencies for good node
37 If this option is not enabled, the tests will be limited to a historical, safe set of CAN
/Zephyr-latest/tests/drivers/can/host/pytest/
Dtest_can.py6 Test suites for testing Zephyr CAN <=> host CAN.
12 import can
13 from can import BusABC, CanProtocol
22 can.Message(arbitration_id=0x10,
27 can.Message(arbitration_id=0x20,
33 can.Message(arbitration_id=0x30,
39 can.Message(arbitration_id=0x40,
46 can.Message(arbitration_id=0x50,
55 Class for testing CAN RX/TX between Zephyr DUT and host.
59 def check_rx(tx: can.Message, rx: can.Message) -> None:
[all …]
Dconftest.py6 Configuration of Zephyr CAN <=> host CAN test suite.
13 from can import Bus, BusABC
21 parser.addoption('--can-context', default=None,
22 help='Configuration context to use for python-can (default: None)')
26 """Return the name of the python-can configuration context to use."""
27 ctx = request.config.getoption('--can-context')
31 if fixture.startswith('can:'):
35 logger.info('using python-can configuration context "%s"', ctx)
56 """Return DUT CAN bus."""
64 """Return host CAN bus."""
/Zephyr-latest/tests/drivers/can/api/
Dtestcase.yaml4 - can
5 depends_on: can
7 drivers.can.api:
9 and not dt_compat_enabled("infineon,xmc4xxx-can-node")
10 drivers.can.api.rtr:
12 and not dt_compat_enabled("infineon,xmc4xxx-can-node")
15 drivers.can.api.twai:
20 drivers.can.api.nxp_s32_canxl.non_rx_fifo:
/Zephyr-latest/samples/drivers/can/counter/
DREADME.rst1 .. zephyr:code-sample:: can-counter
2 :name: Controller Area Network (CAN) counter
5 Send and receive CAN messages.
10 This sample demonstrates how to use the Controller Area Network (CAN) API.
24 The sample can be built and executed for boards with a SoC that have an
25 integrated CAN controller or for boards with a SoC that has been augmented
26 with a stand alone CAN controller.
28 Integrated CAN controller
34 :zephyr-app: samples/drivers/can/counter
38 Stand alone CAN controller
[all …]
/Zephyr-latest/include/zephyr/drivers/can/
Dtransceiver.h10 #include <zephyr/drivers/can.h>
18 * @brief CAN Transceiver Driver APIs
19 * @defgroup can_transceiver CAN Transceiver
33 * @brief Callback API upon enabling CAN transceiver
39 * @brief Callback API upon disabling CAN transceiver
52 * @brief Enable CAN transceiver
54 * Enable the CAN transceiver.
56 * @note The CAN transceiver is controlled by the CAN controller driver and
72 * @brief Disable CAN transceiver
74 * Disable the CAN transceiver.
[all …]
/Zephyr-latest/drivers/can/transceiver/
DKconfig1 # CAN transceiver configuration options
6 menu "CAN transceiver drivers"
9 int "CAN transceiver driver init priority"
12 CAN transceiver device driver initialization priority.
15 bool "GPIO controlled CAN transceiver"
20 Enable support for GPIO controlled CAN transceivers.
/Zephyr-latest/dts/bindings/can/
Dcan-controller.yaml1 # Common fields for CAN controllers
30 Actively controlled CAN transceiver.
33 transceiver0: can-phy0 {
34 compatible = "nxp,tja1040", "can-transceiver-gpio";
48 Passive CAN transceiver. The child node must be named "can-transceiver".
54 can-transceiver {
63 The minimum bitrate supported by the CAN transceiver in bits/s.
69 The maximum bitrate supported by the CAN transceiver in bits/s.

12345678910>>...172