The MBa65xx provides the CAN interfaces CAN0 and CAN1.
DIP switches SW2 and SW3 are used to configure the CAN interfaces CAN0 and CAN1.
Function | SWx-1 | SWx-2 |
---|---|---|
CAN-Bus not terminated | OFF | OFF |
not defined (illegal state) | OFF | ON |
not defined (illegal state) | ON | OFF |
CAN-Bus terminated with 120 Ohm | ON | ON |
CAN FD can be enabled by the following commands in the shell:
ip link set can0 down ip link set can0 up type can bitrate 500000 sample-point 0.75 dbitrate 4000000 dsample-point 0.8 fd on ip link set can1 down ip link set can1 up type can bitrate 500000 sample-point 0.75 dbitrate 4000000 dsample-point 0.8 fd on
candump can0& cansend can1 5A1#11.2233.44556677.88
candump can1& cansend can0 5A1#11.2233.44556677.88
The STKa65xx Starterkit provides seven Gigabit Ethernet interfaces.
The IP configuration can be done statically or by a DHCP server in the network.
IP configuration via DHCP
For a configuration via a DHCP server, use the dhcp
command in U-Boot.
Static IP configuration For a static IP configuration the following, U-Boot environment variables must be set:
setenv ipaddr <ipaddr> (e.g.: setenv ipaddr 192.168.100.111) setenv netmask <netmask> (e.g.: setenv netmask 255.255.255.0)
The Ethernet interface is activated and configured by systemd-network. The configuration file for the eth0 interface is located in /lib/systemd/network/ these configuration file can be altered to customize the default interface configuration. A documentation of the configuration files can be found here.
eth0 | 10-eth0.network |
For a temporary static configuration the ip command can be used, below some useful ip commands are listed:
Activate a specific interface
e.g. eth0
ip link set eth0 up
Disable a specific interace
e.g. eth0
ip link set eth0 down
Show ip address for a specific interface
e.g. eth0
ip addr show eth0
Show statistic for a specific interface
e.g. eth0
ip -s link show eth0
Set ip address for a specific interface
e.g. eth0
ip addr add 192.168.1.100/24 dev eth0
Show statistic of all interfaces
ip -s link
Set default gateway for a specific interfaces
e.g. set gateway ip 192.168.1.1 for eth0
ip route add default via 192.168.1.1 dev eth0
If a DHCP server is available in the network environment the ip configuration can be received from it. To do so execute the udhcpc
command, by default eth0 is used.
To configure another interface via dhcp the parameter -i
followed by the interface name e.g. eth1 must be given.
e.g. eth1
udhcpc -i eth1
An overview of the onboard i2c devices is available here
Select i2c bus device
i2c dev 0
Show all devices connected to the i2c bus currently selected:
i2c probe
Detect all devices connected to a i2c bus:
i2cdetect 0
To set the hardware clock to the actual time and date use the following commands:
date -s [YYYY.]MM.DD-hh:mm[:ss] hwclock -w
The STKa65xx has one temperature sensors, located on the TQMa65xx SOM.
Device | I²C Address |
---|---|
TQMa65xx | 0x1F |
Read TQMa65xx Temperature Sensor
cat /sys/devices/platform/bus@100000/bus@100000:bus@28380000/bus@100000:bus@28380000:bus@42040000/42120000.i2c/i2c-0/0-001f/hwmon/hwmon0/temp1_input
Read CPU internal Temperature Sensor
The AM65xx CPU has an internal TMU that supports three thermal zones, all can be read by the commands below:
Thermal zone0
cat /sys/devices/virtual/thermal/thermal_zone0/temp
Thermal zone1
cat /sys/devices/virtual/thermal/thermal_zone1/temp
Thermal zone2
cat /sys/devices/virtual/thermal/thermal_zone2/temp
With lsusb
you can see all connected usb devices. To mount a partition of an usb stick you can excute mount /dev/<partition> <mount dir>
(e.g. mount /dev/sdb1 /mnt)
. This will mount the first partition of sdb to /mnt. To unmount the device execute umount <mount dir>
(e.g. umount /mnt
).
The MBa65xx has two user controllable LEDs, the behavior of these LEDs can be selected by several triggers.
Reference | LED name | color | linux filesystem |
---|---|---|---|
V1 | led0 | blue | /sys/class/leds/led1 |
V2 | led1 | blue | /sys/class/leds/led2 |
The user LED's are located in /sys/devices/platform/leds/leds/.
To change the behaviour a specific LED, the value in the file trigger must be overwritten.
The following values are valid:
For example set the trigger of led1 to heartbeat
echo heartbeat > /sys/class/leds/led1/trigger