Difference between revisions of "FAQs (Axel)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Q: How can I change the CPU clock frequency?)
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{WorkInProgress}}
 
 
{{InfoBoxTop}}
 
{{InfoBoxTop}}
 
{{AppliesToAxel}}
 
{{AppliesToAxel}}
 
{{AppliesToAxelLite}}
 
{{AppliesToAxelLite}}
 +
{{AppliesToAxelEsatta}}
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
  
= Introduction =
+
== Introduction ==
  
This page collects all the Frequently Asked Question regarding Axel Ultra/Lite SOMs
+
This page collects all the Frequently Asked Question regarding Axel Ultra/Lite SOMs and XELK kit.
  
= General =
+
== General ==
  
=== Q: Where can I found Axel SOMs information? ===  
+
=== Q: Where can I find Axel SOMs information? ===  
 
'''A''': please refer to the following table:
 
'''A''': please refer to the following table:
  
Line 22: Line 22:
 
| [[:Category:AxelLite|Axel Lite category page]] || This page lists all the wiki pages regarding the Axel Lite CPU module
 
| [[:Category:AxelLite|Axel Lite category page]] || This page lists all the wiki pages regarding the Axel Lite CPU module
 
|-
 
|-
| [[Axel_Ultra_SOM | Axel Ultra SOM]] || This page reports Axel Ultra SOM specification and basic information
+
| [[:Category:AxelUltra|Axel Ultra category page]] || This page reports Axel Ultra SOM specification and basic information
 
|-
 
|-
| [[Axel_Lite_SOM | Axel Lite SOM]] || This page reports Axel Lite SOM specification and basic information
+
| [[:Category:AxelLite|Axel Lite category page]] || This page reports Axel Lite SOM specification and basic information
 
|-
 
|-
 
| [[Hardware_Manual_(AxelUltra) | Axel Ultra Hardware Manual]] || This page points to the Axel Ultra Hardware Manual
 
| [[Hardware_Manual_(AxelUltra) | Axel Ultra Hardware Manual]] || This page points to the Axel Ultra Hardware Manual
Line 71: Line 71:
 
* has a proper subnet IP address
 
* has a proper subnet IP address
 
For detailed information, please refer to [[Booting_Linux_Kernel#Configuration_net_nfs | Configuration net_nfs]]
 
For detailed information, please refer to [[Booting_Linux_Kernel#Configuration_net_nfs | Configuration net_nfs]]
 +
 +
=== Q: How can I access the git server repositories for updating? ===
 +
'''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:
 +
 +
[[File:VM-IP-fixed.png|300px]]
 +
 +
then simply test the Internet access using the '''ping command''' to Google's web site and then to DAVE's git server:
 +
<pre class="board-terminal">
 +
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:~$
 +
</pre>
  
 
=== Q: How can I access GPIOs from user space ===
 
=== Q: How can I access GPIOs from user space ===
Line 149: Line 179:
 
=== Q: How can I read the CPU temperature? ===
 
=== Q: How can I read the CPU temperature? ===
  
'''A''': CPU temperature is reported by the Anatop Thermal driver. To read the he temperature, enter this command from the Linux shell:
+
'''A''': CPU temperature is reported by the Anatop Thermal driver. To read the temperature, enter this command from the Linux shell:
  
 
<pre class="board-terminal">
 
<pre class="board-terminal">
Line 157: Line 187:
  
 
CPU temperature is shown without decimal point, but the latest three digits are decimal.
 
CPU temperature is shown without decimal point, but the latest three digits are decimal.
 +
 +
=== Q: How can I adjust LCD brightness? ===
 +
 +
'''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'' 
 +
 +
<pre class="board-terminal">
 +
root@axel-lite:~# cat /sys/class/backlight/backlight.30/brightness
 +
75
 +
</pre>
 +
 +
To set a new brightness level, enter this command from the Linux shell (100 is an example):
 +
 +
<pre class="board-terminal">
 +
root@axel-lite:~# echo 100 > /sys/class/backlight/backlight.30/brightness
 +
</pre>
 +
 +
Max value accepted for brightness can be read entering the following commands:
 +
 +
<pre class="board-terminal">
 +
root@axel-lite:~# cat /sys/class/backlight/backlight.30/max_brightness
 +
100
 +
</pre>
 +
 +
'''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:
 +
 +
<pre class="board-terminal">
 +
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
 +
</pre>
 +
 +
=== Q: How can I modify the splash screen in U-Boot? ===
 +
 +
'''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? ===
 +
By default, iMX6 RTC driver is built into the Linux kernel. Upon power-up, it prints informational messages that look like this.
 +
 +
<pre class="board-terminal">
 +
[    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)
 +
</pre>
 +
 +
To initialize it, please use these commands:
 +
 +
<pre class="board-terminal">
 +
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
 +
</pre>
 +
 +
To enter RTC mode, use the <code>shutdown</code> command as shown in the following example:
 +
 +
<pre class="board-terminal">
 +
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.
 +
</pre>
 +
 +
If a coin call battery is connected to PMIC_LICELL, RTC will be kept alive even if 3V3VIN voltage is removed. Please refer to [[Integration_guide_(Axel)#Real-time_clock_.28RTC.29|these important issues]] related to RTC power handling.
 +
 +
=== Q: How can I enable UART5 – J21? ===
 +
UART 5 communication can be enabled by adjusting the led ''rs232_485_422'' level to HIGH.
 +
 +
You can find the configuration's folder here:
 +
<pre class="board-terminal">
 +
ls /sys/class/leds/
 +
mmc0::  mmc1::  rs232_485_422  rs232_on
 +
</pre>
 +
To enable the serial communication, set the led's value to HIGH, as follows:
 +
<pre class="board-terminal">
 +
echo 255 > /sys/class/leds/rs232_485_422/brightness
 +
</pre>
 +
Please rely on the [http://www.dave.eu/sites/default/files/files/sbcx-ug.pdf SBX User Guide] to set the correct serial operation mode.

Revision as of 09:07, 15 October 2018

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 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.