Changes

Jump to: navigation, search

DESK-MX6-L/Peripherals/Ethernet

5,160 bytes added, 15:40, 9 October 2020
Created page with "{{subst:Peripheral | nome-som=AXEL Lite | nome-peripheral = Ethernet}}"
<section begin=History/>
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
|-
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|[TBD_link X.Y.Z]
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|-
|}
<section end=History/>
<section begin=Body/>

==Peripheral Ethernet ==

''TBD: sostituire tutti i dump con le informazioni sull'uso della periferica''

=== Device tree configuration ===
Here below an example of device tree configuration used on standard DAVE's kit for the AXEL Lite SOM:

From <code>''carrier.dts''</code>:

<pre>
&can1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1_axel>;
status = "okay";
};
</pre>

From <code>''carrier-common.dtsi''</code>:

<pre>
can1 {
pinctrl_flexcan1_axel: flexcan1axelgrp-1 {
fsl,pins = <
MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x80000000
MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x80000000
>;
};
};
</pre>

===Accessing the peripheral===
====Linux messages at boot time====

<pre class="workstation-terminal">
...
...
[ 1.807495] flexcan 2090000.flexcan: 2090000.flexcan supply xceiver not found, using dummy regulator
[ 1.817366] flexcan 2090000.flexcan: device registered (reg_base=c0a30000, irq=31)
...
...
[ 3.952659] can: controller area network core (rev 20170425 abi 9)
[ 3.963413] can: raw protocol (rev 20170425)
[ 3.967717] can: broadcast manager protocol (rev 20170425 t)
[ 3.973397] can: netlink gateway (rev 20170425) max_hops=1
</pre>

====Enable the interface and check status====
<pre class="workstation-terminal">
root@imx6qxelk:~# ip link set can0 type can bitrate 500000
root@imx6qxelk:~# ifconfig can0 up
root@imx6qxelk:~# 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 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 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:31

root@imx6qxelk:~#
</pre>

==== Usage with [https://github.com/linux-can/can-utils can-utils] ====

''TBD: reference verso eventuali informazioni sul web''

<pre class="workstation-terminal">
root@imx6qxelk:~# ip link set can0 type can bitrate 500000 triple-sampling on
root@imx6qxelk:~# ifconfig can0 up
root@imx6qxelk:~# cansend can0 128#1122334455667788
root@imx6qxelk:~# candump can0
can0 128 [8] 11 22 33 44 55 66 77 88
root@imx6qxelk:~#
</pre>

=== Additional information ===
Each CAN port appears like a networking interface in the form <code>canX</code> where <b><i>X</i></b> is the port number.

Information about programming the CAN socket interface is given in the kernel tree under ''Documentation/networking/can.txt''
<section end=Body/>

----

[[Category:AXEL Lite]]
8,226
edits

Navigation menu