Changes

Jump to: navigation, search

DESK-MX6UL-L/Peripherals/CAN

104 bytes added, 14:29, 20 July 2021
m
[[File:TBD.png|thumb|center|200px|Work in progress]]
 
<section begin=History/>
{| style="border-collapse:collapse; "
==Peripheral CAN ==
{{ImportantMessage|text=The CAN peripheral is not available on [[AXEL_ULite_SOM/AXEL_ULite_Evaluation_Kit | AXEL ULite EVK]]. This peripheral is available on the i.MX6UL standard product [[SBC_Lynx_SBC | SBCLynx]]}}
=== Device tree configuration ===
Here below an example of device tree configuration used on standard DAVE's kit for the [[AXEL ULite SOM]]:
From <code>imx6ul-lynx-som0013-cb00XXcb002f.dts</code>:
<pre>
...
...
[ 2.717142722873] flexcan 2090000.flexcan: 2090000.flexcan supply xceiver not found, using dummy regulator[ 2.728107734031] flexcan 2090000.flexcan: device registered (reg_base=a099c000, irq=24)
...
...
====Enable the interface and check status====
<pre class="workstation-terminal">
root@desk-mx6ul-axelulitelynx:~# ip link set can0 type can bitrate 500000root@desk-mx6ul-axelulitelynx:~# ifconfig can0 uproot@desk-mx6ul-axelulitelynx:~# ifconfig can0
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1 RX packets:0 2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 16 (016.0 B) TX bytes:0 (0.0 B)
Interrupt:24
root@desk-mx6ul-axelulitelynx:~#
</pre>
==== Usage with [https://github.com/linux-can/can-utils can-utils] ====
 
''TBD: reference verso eventuali informazioni sul web''
<pre class="workstation-terminal">
root@desk-mx6ul-axelulitelynx:~# ip link set can0 type can bitrate 500000 triple-sampling onroot@desk-mx6ul-axelulitelynx:~# ifconfig can0 uproot@desk-mx6ul-axelulitelynx:~# cansend can0 128#1122334455667788interface = can0, family = 29, type = 3, proto = 1root@desk-mx6ul-axelulitelynx:~# candump can0
can0 128 [8] 11 22 33 44 55 66 77 88
root@desk-mx6ul-axelulitelynx:~#
</pre>
8,154
edits

Navigation menu