FAQs (Axel)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite
Axel-02.png Applies to AXEL ESATTA

Introduction[edit | edit source]

This page collects all the Frequently Asked Question regarding Axel Ultra/Lite SOMs and XELK kit.

General[edit | edit source]

Q: Where can I find Axel SOMs information?[edit | edit source]

A: please refer to the following table:

Resource Description
Axel Ultra category page This page lists all the wiki pages regarding the Axel Ultra CPU module
Axel Lite category page This page lists all the wiki pages regarding the Axel Lite CPU module
Axel Ultra category page This page reports Axel Ultra SOM specification and basic information
Axel Lite category page This page reports Axel Lite SOM specification and basic information
Axel Ultra Hardware Manual This page points to the Axel Ultra Hardware Manual
Axel Lite Hardware Manual This page points to the Axel Lite Hardware Manual
Axel Ultra product page This is Axel Ultra web page on DAVE Embedded Systems website
Axel Lite product page This is Axel Lite web page on DAVE Embedded Systems website

System design[edit | edit source]

Q: Can you suggest some guidelines for the carrier board design?[edit | edit source]

A: As a starting point, you can refer to the Wiki page dedicated to the Carrier_board_design_guidelines_(SOM), that will highlight some best practices that applies to all SOMs. For specific information on Axel, please refer to the Axel Integration Guide Integration_guide_(Axel)

Using XELK[edit | edit source]

Q: I've received the XELK package. How am I supposed to start working with it?[edit | edit source]

A: You can follow the steps listed below:

  1. Check the kit contents with the packing list included in the box
  2. Insert the SD into the card slot on the carrier board
  3. Connect the power supply adapter and the serial cable
  4. Start your terminal emulator program
  5. Switch on the power supply
  6. Monitor the boot process on the serial console
  7. Install and configure the development environment as described in the XELK Quick Start Guide.
  8. Check for updates of the source tree repositories provided with the kit, as described in XELK Updates

Q: How can I update the XELK version?[edit | edit source]

A: All XELK source trees (U-Boot and Linux kernel) are provided as git repositories. This means that these components can be kept in sync and up to date with DAVE Embedded Systems repositories. Once the a git account is enabled, the developer can clone the repository and synchronize a source tree using git commands. For further details, please refer to XELK Updates.

Q: Where can I found the XELK Quick Start Guide document?[edit | edit source]

A: This document is included in the XELK distribution and can be downloaded from XELK_Quick_Start_Guide.

Q: Does XELK include support for the Yocto build system?[edit | edit source]

A: Yes, starting from version 2.0.0, XELK provides the axel-bsp repository and a meta-axel layer for integration with the Yocto build system. For additional details, please refer to XELK_Quick_Start_Guide.

Q: How can I configure the Axel system to boot from network?[edit | edit source]

A: Booting from network is very helpful during the software development (both for kernel and applications). The kernel image is downloaded via TFTP while the root file system is remotely mounted via NFS from the host. It is assumed that the development host:

  • is connected with the target host board through an Ethernet LAN
  • exports the directory containing the root file system for the target through the NFS server
  • runs a TFTP server.
  • has a proper subnet IP address

For detailed information, please refer to Configuration net_nfs

Q: How can I access the git server repositories for updating?[edit | edit source]

A: for accessing git.dave.eu git server repositories, the VM Netowrk interface should be configured for Internet access

  • if the network interface is configured in NAT: the PC host interface should have Internet access and the DNS has to be configured for name resolution. For example, it should ne enough to use the Google DNS, i.e. 8.8.8.8
  • if the network interface is configured in Bridge: the IP address should have a proper access to Interner and the DNS server has to be properly configured

Here below an wired connection example for an IP address with Bridged configuration via Host network interface:

VM-IP-fixed.png

then simply test the Internet access using the ping command to Google's web site and then to DAVE's git server:

dvdk@vagrant-ubuntu-trusty-64:~$ ping www.google.it
PING www.google.it (216.58.205.67) 56(84) bytes of data.
64 bytes from mil04s25-in-f67.1e100.net (216.58.205.67): icmp_seq=1 ttl=53 time=7.03 ms
64 bytes from mil04s25-in-f67.1e100.net (216.58.205.67): icmp_seq=2 ttl=53 time=7.74 ms
^C
--- www.google.it ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 7.036/7.390/7.745/0.364 ms
dvdk@vagrant-ubuntu-trusty-64:~$ ping git.dave.eu
PING pmox001.dave.eu (79.143.179.155) 56(84) bytes of data.
64 bytes from pmox001.dave.eu (79.143.179.155): icmp_seq=1 ttl=53 time=24.1 ms
64 bytes from pmox001.dave.eu (79.143.179.155): icmp_seq=2 ttl=53 time=24.0 ms
^C
--- pmox001.dave.eu ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 24.034/24.089/24.145/0.164 ms
dvdk@vagrant-ubuntu-trusty-64:~$ 

Q: How can I access GPIOs from user space[edit | edit source]

A: Users can access GPIOs using SYSFS entries from user space. This feature is enabled by default in the AXEL Linux kernel configuration. For further details, please refer to:

Q: How can I reduce the RAM amount to evaluate the performances of the low-end versions of the Axel SoM?[edit | edit source]

A: To evaluate the performances of the system with a specific amount of available RAM, the user can pass the mem parameter to the kernel, by setting the command line arguments in u-boot (for detailed instruction, please refer to the Change_Linux_Command_Line_Parameter_from_U-boot page).

For example, to limit the amount of RAM to 128 MB, create the following variables in u-boot:

setenv mem 128MB
setenv addmem 'setenv bootargs ${bootargs} mem=${mem}'

And add the addmem variable to the boot macro:

setenv net_nfs 'run loadk loadfdt nfsargs addip addcons addmem; bootm ${buf} ${dtb_addr}'

For further details, please refer to the linux-am33x/Documentation/kernel-parameters.txt file of the kernel source tree provided with the XELK.

Q: How can I limit the number of active CPU cores?[edit | edit source]

A: To evaluate the performances of the system with reduced number of CPU cores, the user can pass the maxcpus parameter to the kernel, by setting the command line arguments in u-boot (for detailed instruction, please refer to the Change_Linux_Command_Line_Parameter_from_U-boot page).

For example, to set the number of active cores to 2, add the maxcpus parameter to the addmisc environment variable:

setenv addmisc 'setenv bootargs ${bootargs} maxcpus=2'

And add the addmisc variable to the boot macro:

setenv net_nfs 'run loadk loadfdt nfsargs addip addcons addmisc; bootm ${buf} ${dtb_addr}'

For further details, please refer to the linux-am33x/Documentation/kernel-parameters.txt file of the kernel source tree provided with the XELK.

Q: How can I change the CPU clock frequency?[edit | edit source]

A: The frequency of the CPU can be changed on the run using the Cpufreq framework (please refer to the documentation included into the Documentation/cpu-freq directory of the kernel source tree). The cpufreq framework works in conjunction with the related driver & governor.

Cpufreq implementation controls the Linux OPP (Operating Performance Points) adjusting the CPU core voltages and frequencies. CPUFreq is enabled by default in the AXEL kernel configuration.

To view the available governors:

root@axel-lite:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
interactive conservative ondemand userspace powersave performance

To view the supported OPP's (frequency in KHz):

root@axel-lite:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
396000 792000 996000

To change the OPP:

root@axel-lite:~# echo 396000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Please note that OPP can be changed only using the userspace governor. If governors like ondemand is used, OPP change happens automatically based on the system load. Please also note that the imx6q-cpufreq driver (http://lxr.free-electrons.com/source/drivers/cpufreq/imx6q-cpufreq.c?v=3.10) works on a per-SOC policy (and not on a per-core one), so the cpufreq governor changes the clock speed for all the ARM cores simultaneously.

To change the governor (userspace in the example):

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Q: How can I read the CPU temperature?[edit | edit source]

A: CPU temperature is reported by the Anatop Thermal driver. To read the temperature, enter this command from the Linux shell:

root@axel-lite:~# cat /sys/class/thermal/thermal_zone0/temp
36676

CPU temperature is shown without decimal point, but the latest three digits are decimal.

Q: How can I adjust LCD brightness?[edit | edit source]

A: brightness level can be changed via sysfs entry. To read the current brightness level, enter this command from the Linux shell:

Note: Xelk-3.0.0 has been released with a new kernel version which no longer requires the .n notation in the path. For this reason, the path to use is : /sys/class/backlight/backlight

root@axel-lite:~# cat /sys/class/backlight/backlight.30/brightness
75

To set a new brightness level, enter this command from the Linux shell (100 is an example):

root@axel-lite:~# echo 100 > /sys/class/backlight/backlight.30/brightness

Max value accepted for brightness can be read entering the following commands:

root@axel-lite:~# cat /sys/class/backlight/backlight.30/max_brightness
100

N.B. The brightness index is related to the kernel and dtb compiled version. I.e. in the example index .30 maybe different on your system.

The right index can be found entering the following command from Linux shell:

root@xelk-l:~# ls -la /sys/class/backlight/
drwxr-xr-x    2 root     root             0 Jun 13 11:50 .
drwxr-xr-x   50 root     root             0 Jan  1  1970 ..
lrwxrwxrwx    1 root     root             0 Jun 13 11:50 backlight.30 -> ../../devices/soc0/backlight.30/backlight/backlight.30

Q: How can I modify the splash screen in U-Boot?[edit | edit source]

A: The splash screen in U-Boot is supported starting from version 2013.04-xelk-2.2.0. For detailed information, please refer to Customizing the splash screen (Axel).

Q: How to enter RTC mode?[edit | edit source]

By default, iMX6 RTC driver is built into the Linux kernel. Upon power-up, it prints informational messages that look like this.

[    2.017007] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
[    2.025312] snvs_rtc 20cc034.snvs-rtc-lp: configured with power off disabled
[    3.290548] snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1)

To initialize it, please use these commands:

root@axel-lite:~# date 053014172016
Mon May 30 14:17:00 UTC 2016
root@axel-lite:~# hwclock -w
root@axel-lite:~# hwclock
Mon May 30 14:17:07 2016  0.000000 seconds

To enter RTC mode, use the shutdown command as shown in the following example:

root@axel-lite:~# shutdown -h now

Broadcast message from root@axel-lite (ttymxc2) (Mon May 30 14:17:37 2016):
The system is going down for system halt NOW!
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
root@axel-lite:~# Stopping XServer
Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 686)
dropbear.
 * Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon

** (oprofile-server:732): WARNING **: Avahi error: Daemon connection failed
   ...done.
Stopping advanced power management daemon: no /usr/sbin/apmd found; none killed
apmd.
Stopping system message bus: dbus.
stopping statd: done
stopping mountd: done
stopping nfsd: done
Stopping OProfileUI server
Stopping syslogd/klogd: stopped syslogd (pid 712)
stopped klogd (pid 714)
done
Stopping Connection Manager
Stopping Telephony daemon
ALSA: Storing mixer settings...
not deconfiguring network interfaces: network file systems still mounted.
Stopping Linux NFC daemon
Sending all processes the TERM signal...
rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
Error VT_WAITACTIVE failed
: Interrupted system call
Sending all processes the KILL signal...
Unmounting remote filesystems...
Stopping rpcbind daemon...
not running.
Deactivating swap...
Unmounting local filesystems...
[  234.876402] System halted.

If a coin call battery is connected to PMIC_LICELL, RTC will be kept alive even if 3V3VIN voltage is removed. Please refer to these important issues related to RTC power handling.

Q: How to synchronize date/time?[edit | edit source]

System date and time can be easily kept synchronized using the ntp services available on Internet.

If the ntp package is not present into the rfs, it is possible to install it using the standard smart tool as described here

root@imx6qxelk:~# smart install ntp
Loading cache...
Updating cache...               ######################################## [100%]

Computing transaction...

Installing packages (2):
  ntp-4.2.8p9-r0@cortexa9hf_neon
  ntp-tickadj-4.2.8p9-r0@cortexa9hf_neon

346.7kB of package files are needed. 635.1kB will be used.

Confirm changes? (Y/n): y

Fetching packages...
-> http://yocto.dave.eu/.../ntp-tickadj-4.2.8p9-r0.cortexa9hf_neon.rpm
ntp-tickadj-4.2.8p9-r0.cortex.. ######################################## [ 50%]
-> http://yocto.dave.eu/xelk-4.0.0/.../ntp-4.2.8p9-r0.cortexa9hf_neon.rpm
ntp-4.2.8p9-r0.cortexa9hf_neo.. ######################################## [100%]


Committing transaction...
Preparing...                    ######################################## [  0%]
   1:Installing ntp-tickadj     ######################################## [ 50%]
Output from ntp-4.2.8p9-r0@cortexa9hf_neon:
Running useradd commands...
NOTE: ntp: Performing useradd with [ --system --home-dir /var/lib/ntp                        --no-create-home                        --shell /bin/false --user-group ntp]
   2:Installing ntp             ######################################## [100%]
update-alternatives: Linking /usr/sbin/ntpd to /usr/sbin/ntpd.ntp
Created symlink /etc/systemd/system/multi-user.target.wants/ntpd.service → /lib/systemd/system/ntpd.service.

Saving cache...

root@imx6qxelk:~#

Then the /etc/ntp.conf file has to be modified according to the ntp server pool used for time synchronization, for example in Italy:

server 0.it.pool.ntp.org
server 1.it.pool.ntp.org
server 2.it.pool.ntp.org
server 3.it.pool.ntp.org

Must be sure you are properly configured for your locatimezone. For that purposes, you may have to install the proper tzdata package, for example:

smart install tzdata-europe

and then configure it using timedatectl

root@imx6qxelk:~# timedatectl set-timezone Europe/Rome
root@imx6qxelk:~# timedatectl status
      Local time: Wed 2020-02-19 15:32:02 CET
  Universal time: Wed 2020-02-19 14:32:02 UTC
        RTC time: Wed 2020-02-19 14:32:02
       Time zone: Europe/Rome (CET, +0100)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no
root@imx6qxelk:~#

Q: How can I enable UART5 – J21?[edit | edit source]

UART 5 communication can be enabled by adjusting the led rs232_485_422 level to HIGH.

You can find the configuration's folder here:

ls /sys/class/leds/
mmc0::  mmc1::  rs232_485_422  rs232_on

To enable the serial communication, set the led's value to HIGH, as follows:

echo 255 > /sys/class/leds/rs232_485_422/brightness

Please rely on the SBX User Guide to set the correct serial operation mode.