Skip to content

Commit 286565e

Browse files
committed
Improve CAN documentation
Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
1 parent 8224eb5 commit 286565e

2 files changed

Lines changed: 42 additions & 6 deletions

File tree

docs/source/hardware.rst

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _hardware.rst:
22

3-
########
4-
Hardware
5-
########
3+
###################
4+
Hardware interfaces
5+
###################
66

77
Since the Charge SOM itself is a module which cannot be used without a carrier board,
88
the following sections refer to the Charge SOM Evaluation Board as an example.
@@ -86,8 +86,33 @@ the board supports up to two EIA-485 interfaces.
8686
CAN (X16)
8787
*********
8888

89-
The CAN-FD interface is connected to X16, which is a full implementation of the CAN FD
90-
protocol specification version 2.0B. It is available on Linux network interface ``can0``.
89+
The CAN-FD interface is connected to X16, which is a full implementation of the CAN FD protocol
90+
specification version 2.0B. It is available on Linux network interface ``can0``, which has a
91+
default bitrate of 1 Mbit/s.
92+
93+
CAN configuration
94+
=================
95+
96+
In order to change the default CAN bitrate permanent, please adapt BitRate value and run the following commands:
97+
98+
.. code-block:: console
99+
100+
cat <<EOF > /etc/systemd/network/can0.network
101+
[Match]
102+
Name=can0
103+
104+
[Link]
105+
RequiredForOnline=no
106+
107+
[CAN]
108+
BitRate=125000
109+
TripleSampling=yes
110+
EOF
111+
112+
networkctl reload
113+
networkctl reconfigure can0
114+
systemctl restart everest
115+
91116
92117
********************************************
93118
Insulation Monitoring Device (IMD, X9 + X15)
@@ -135,14 +160,15 @@ still depend on the pinmuxing of these 16 pins!
135160
+---------------+------------------+-----------------------------------+-------------------------------------------+
136161
| SDIO | 1 | | |
137162
+---------------+------------------+-----------------------------------+-------------------------------------------+
138-
| CAN | 1 | | |
163+
| CAN [#]_ | 1 | | |
139164
+---------------+------------------+-----------------------------------+-------------------------------------------+
140165
| PWM | 6 | | |
141166
+---------------+------------------+-----------------------------------+-------------------------------------------+
142167
| GPIO | 16 | - imx93-charge-som-clko-gpio.dtso | Warning: short clock after power-up/reset |
143168
+---------------+------------------+-----------------------------------+-------------------------------------------+
144169

145170
.. [#] The UART7 has RTS/CTS signals available.
171+
.. [#] Keep in mind that these signals must be connected to a CAN transceiver.
146172
147173
The following table indicates all possible muxing options for these signals.
148174
By default, the factory shipped configuration for the Charge SOM EVB is that the signals GPIO3_26 and GPIO3_27

docs/source/troubleshooting.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ for timing critical use cases. Currently there is no EVerest module, which is ab
5858
In order to realize realtime emergency stop behavior use the SAFETY_ESTOPx signals, which are connected to the safety processor.
5959

6060

61+
Is there a Linux command to check for connection related CAN issues?
62+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63+
64+
Yes
65+
66+
.. code-block:: console
67+
68+
root@chargesom:/# ip -details -statistic link show can0
69+
70+
6171
How can I list the available UARTs?
6272
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6373

0 commit comments

Comments
 (0)