zephyr/samples/drivers/CAN
Alexander Wachter 8b214117ec drivers: CAN: MCP2515: Move OSC frequency definition to device-tree
Move the oscillator frequency definition from Kconfig to device-tree.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-09 06:27:53 -05:00
..
src samples: drivers: CAN: reworked sample code 2019-08-18 09:56:42 +02:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig samples: drivers: CAN: reworked sample code 2019-08-18 09:56:42 +02:00
mcp2515-dts.overlay drivers: CAN: MCP2515: Move OSC frequency definition to device-tree 2019-10-09 06:27:53 -05:00
prj.conf samples: drivers: CAN: reworked sample code 2019-08-18 09:56:42 +02:00
README.rst doc: s/device tree/devicetree/ 2019-10-08 11:53:40 +02:00
sample.yaml samples: CAN: Add testing harness 2019-08-26 22:33:14 -04:00

.. _can-sample:

Controller Area Network
#######################

Overview
********

This sample demonstrates how to use the Controller Area Network (CAN) API.
Messages with standard and extended identifiers are sent over the bus.
Messages are received using message-queues and work-queues.
Reception is indicated by blinking the LED (if present) and output to the console.

Building and Running
********************

In loopback mode, the board receives its own messages. This could be used for
standalone testing.

The sample can be built and executed on boards supporting CAN.
The LED output pin is defined in the board's devicetree.

Sample output
=============

.. code-block:: console

   Change LED filter ID: 0
   Finished init.
   Counter filter id: 4

   uart:~$ Counter received: 0
   Counter received: 1
   Counter received: 2
   Counter received: 3

.. note:: The values shown above might differ.