Unit Testing¶
CPU info¶
root@varsomam43:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
Hardware : Generic AM43 (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
root@varsomam43:~# cat /proc/version
Linux version 3.14.26-gde9decc-dirty (am43@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Tue Jan 20 02:46:07 PST 2015
root@varsomam43:~#
RTC¶
To set the RTC first set the date from Linux shell, type:
Then set the real time clock from Linux shell, type:
Power down your board wait 15 seconds and power up. Check your system with date and the time should be up to date.
Audio record/play¶
$ aplay /usr/share/sounds/alsa/Front_Center.wav
$ arecord -f cd -d 10 -D hw:0,0 test.wav
$ aplay test.wav
WLAN¶
The VAR-SOM-AM43 device features a WL183x module, which needs to be configured after installing a new SW image.
Instructions for configuring (only in the first boot):
$ cd /usr/bin/wlconf/
$ ./configure-device.sh [WL18xx chip]
Then choose the correct number of antennas on board and choose (y) to generate a configuration file from wl18xx-conf.bin file.
For example:
root@varsomam43:/usr/bin/wlconf# ./configure-device.sh wl1835
Device is capable of supporting 2 antenna in 2.4Ghz band
how many antennae are fitted? [1/2] : 1
Error: Module wlcore_sdio is not currently loaded
A wl18xx-conf.bin file already exists, do you want to modify it (y) or generate a clean one from .ini (y)
modify it? [y/n] : y
General usage:
List SSIDs, from Linux shell type:
Connecting to an encrypted network:
Find your network from the above scan command.
$ wpa_passphrase <YourAP> <YourPassword> >wpa.conf
$ ps | grep wpa_supplicant
*kill the wpa_supplicant process if exist.
$ wpa_supplicant -Dnl80211 -iwlan0 -c./wpa.conf -B
$ udhcpc -iwlan0
$ ifconfig
- WL18xx calibration tool
Calibration of TI WL12xx wireless device is required and is saved into the NVS file. The NVS file is then used by the wl12xx driver. For more details please read NLCP Calibration Process
Gbit Ethernet - ETH0¶
Please follow the instructions below to activate the ETH1 device and acquire IP for testing. On Target:
On Host:
Gbit Ethernet - ETH1¶
First, make sure your VAR-SOM-AM43 device supports ETH1.
Please follow the instructions below:
1) Build the correct DTB that supports ETH1 port and replace it on the SD-Card:
make -j6 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- var-som-am43-eth1.dtb
sudo cp arch/arm/boot/dts/var-som-am43-eth1.dtb /media/rootfs/boot/var-som-am43.dtb
sync
sudo umount /media/boot/
sudo umount /media/rootfs
sudo umount /media/user
2) Then, activate the ETH1 device and acquire IP for testing. On Target:
On Host:
OpenGL demo (supported CPUs)¶
Run the demo script at Linux command prompt after the VAR-DVK-AM43 EVB boots up
ADC controller¶
please follow TI wiki pages: http://processors.wiki.ti.com/index.php/AM335x_ADC_Driver%27s_Guide
USB OTG as host¶
From SW perspective, the developer should do as follows:
- Download a VAR-SOM-AM43 kernel out-of-tree.
- Update var-som-am43.dts, as follows:
$ gedit arch/arm/boot/dts/var-som-am43.dts
...
usb@47401800 {
status = "okay";
dr_mode = "host"; /* <<-- Add this line */
};
...
- Build var-som-am43.dtb and replace it on flash / NFS.
Once the var-som-am43.dtb has been replaced on the rootfs - The USB-OTG port will function in Host-only mode.
At this point, the user can simply connect a USB Mouse or DOK to the OTG port.
USB OTG as device¶
Plug a USB cable to a Linux or a Windows host.
Follow www.linux-usb.org/gadget/file_storage.html and build the backing_file.
On the Target:
On the Host:
Wait for a mass-storage device to be detected.
Bluetooth¶
- Bring BT device up:
- Scan for BT devices and ping:
Then work with any other standard bluetooth API and commands.
CAN Bus¶
- Connect CANL, CANH and GND pins of two VAR-SOM-AM43 boards (located on J17).
- Power-up both boards.
- Type the following into the shell of both boards for configuration the CAN bus device:
- Type the following to the shell of board 1 (which is used for testing receiving over can0 device):
- Type the following to the shell of board 2 (which is used for testing sending data packets over can0 device):
- At this point, board 1 will receive the data packet sent from board 2:
RS-232 port¶
- Start minicom and connect to a UART device:
RS-485 port¶
Please do as follows to enable and test RS-485 port:
1. Set the RS-485 port to loopback mode by shorting pins 1 to 3 and 2 to 4 on J11 (on the carrier board).
- Issue the following commands to the Linux shell to enable:
$ echo 168 > /sys/class/gpio/export
$ echo "out" > /sys/class/gpio/gpio168/direction
$ echo 0 > /sys/class/gpio/gpio168/value
# Tx enable: gpio173
$ echo 173 > /sys/class/gpio/export
$ echo "out" > /sys/class/gpio/gpio173/direction
$ echo 1 > /sys/class/gpio/gpio173/value
$ minicom -D/dev/ttyO2 -b115200 -8
- Type a few characters at the minicom and see that the loopback is working.