Skip to content

Commit 705d1ce

Browse files
authored
Merge pull request #81 from chargebyte/everest/charge_som_trouble
Extend Troubleshooting & CAN documentation
2 parents 97e59da + 63b8e48 commit 705d1ce

2 files changed

Lines changed: 93 additions & 6 deletions

File tree

docs/source/hardware.rst

Lines changed: 30 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,31 @@ 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 of can0 interface, please adapt ``BitRate`` value and
97+
run the following commands:
98+
99+
.. code-block:: console
100+
101+
mkdir /etc/systemd/network/can0.network.d
102+
cat <<EOF > /etc/systemd/network/can0.network.d/bitrate.conf
103+
[CAN]
104+
BitRate=125000
105+
EOF
106+
107+
networkctl reload
108+
networkctl reconfigure can0
109+
systemctl restart everest
110+
111+
The change takes effect immediately, but also persists across reboots and
112+
firmware updates.
113+
91114

92115
********************************************
93116
Insulation Monitoring Device (IMD, X9 + X15)
@@ -135,14 +158,15 @@ still depend on the pinmuxing of these 16 pins!
135158
+---------------+------------------+-----------------------------------+-------------------------------------------+
136159
| SDIO | 1 | | |
137160
+---------------+------------------+-----------------------------------+-------------------------------------------+
138-
| CAN | 1 | | |
161+
| CAN [#]_ | 1 | | |
139162
+---------------+------------------+-----------------------------------+-------------------------------------------+
140163
| PWM | 6 | | |
141164
+---------------+------------------+-----------------------------------+-------------------------------------------+
142165
| GPIO | 16 | - imx93-charge-som-clko-gpio.dtso | Warning: short clock after power-up/reset |
143166
+---------------+------------------+-----------------------------------+-------------------------------------------+
144167

145168
.. [#] The UART7 has RTS/CTS signals available.
169+
.. [#] Keep in mind that these signals must be connected to a CAN transceiver.
146170
147171
The following table indicates all possible muxing options for these signals.
148172
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: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ and a `library <https://github.com/EVerest/everest-core/tree/main/lib/everest/ca
4141
which uses the CAN interface. This might help as a starting point.
4242

4343

44+
How can I access the GPIOs under Linux?
45+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
47+
Since the GPIO sysfs interface /sys/class/gpio has been deprecated since Linux 4.8,
48+
we recommend the usage of chardev GPIO and libgpiod. The modification of the bias
49+
settings via libgpiod is not yet implemented, so it needs to be done via device tree.
50+
51+
4452
What is the difference between CHSTOP_IN and SAFETY_ESTOPx?
4553
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4654

@@ -50,6 +58,61 @@ for timing critical use cases. Currently there is no EVerest module, which is ab
5058
In order to realize realtime emergency stop behavior use the SAFETY_ESTOPx signals, which are connected to the safety processor.
5159

5260

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+
71+
How can I list the available UARTs?
72+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73+
74+
All UARTs of the i.MX93 are handled by the fsl-lpuart driver, so the following
75+
command should list all available UARTs. Please keep in mind that Linux starts
76+
counting from zero (ttyLP0 = UART1, ...).
77+
78+
.. code-block:: console
79+
80+
root@chargesom:/# cat /proc/tty/driver/fsl-lpuart
81+
serinfo:1.0 driver revision:
82+
0: uart:FSL_LPUART mmio:0x44380010 irq:17 tx:9932 rx:0 RTS|CTS|DTR|DSR|CD
83+
2: uart:FSL_LPUART mmio:0x42570010 irq:18 tx:12966 rx:26572 RTS|CTS|DTR|DSR|CD
84+
3: uart:FSL_LPUART mmio:0x42580010 irq:19 tx:936 rx:617 RTS|CTS|DTR|DSR|CD
85+
4: uart:FSL_LPUART mmio:0x42590010 irq:20 tx:0 rx:0 CTS|DSR|CD
86+
87+
88+
How can I print the current pin/pad control settings (e.g. bias, drive strength)?
89+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90+
91+
The current PAD control settings are available under Linux only via debugfs,
92+
but this requires an equivalent pinctrl setting within the device tree:
93+
94+
.. code-block:: console
95+
96+
root@chargesom:/# cat /sys/kernel/debug/pinctrl/443c0000.pinctrl/pinconf-pins
97+
Pin config settings per pin
98+
Format: pin (name): configs
99+
pin 0 (IMX93_IOMUXC_DAP_TDI): 0x31e
100+
...
101+
102+
103+
Which LVDS displays have been tested with the Charge SOM EVB?
104+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105+
106+
The `Distec DD-0700-MC01 <https://www.fortec-integrated.de/en/products/tft-components/tft-displays/detail/fortec-integrated/dd-0700-mc01/>`_
107+
(7 inch, 800x480 resolution) has been tested with the Charge SOM EVB.
108+
109+
110+
I like to create my own DT overlay. Is there an example?
111+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112+
113+
Yes, please have a look at this `commit <https://github.com/chargebyte/linux/commit/125a587a0cf7e8d9db1fdddf9383a67c2b46d107>`_ .
114+
115+
53116
Where can I find the device tree sources of the Charge SOM?
54117
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55118

0 commit comments

Comments
 (0)