Linux Software User Manual (i.MX53 Modules)

Aus BECOM Systems Support
Version vom 22. August 2023, 20:35 Uhr von en>Peter (1 Version importiert)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Introduction

Bluetechnix offers a Board Support Package that is based on the U-Boot boot loader and the Linux kernel.

The build environment is LTIB, the Linux Target Image Builder, which is Freescale's preferred way to offer Linux board support packages. Bluetechnix provides a patch set that is installed on top of Freescale's i.MX53 LTIB BSP.

Our BSP offers patches for Linux and U-Boot to work with our i.MX53 module, as well as additional device drivers for components on the i.MX53 modules and base boards. Our aim is to fully support our hardware through device drivers. We also provide unit tests so that testing a board is easy and simple.

We also offer some helper scripts that are part of our releases that we hope make development easier for you.

Support

  • We also do your custom hardware and software development. In case you are interested, send an e-mail to Office.
  • In case you need HW/SW support for Bluetechnix i.MX53 modules, please write to Support.
  • Freescale provides lots of documentation for LTIB, the i.MX53 processor, and Linux/Android/WinCE development on these processors. Visit their website at https://www.freescale.com!
  • Each BSP bundle from Freescale contains lots of documentation we recommend to read. Unpack the archive
Lx.x.x_xx.xx.xx_ER_docs.tar.gz
and open the file
readme.html
in your browser. We recommend at least reading "LTIB Build Host Setup".

Development host setup

We are using Linux distribution Ubuntu 10.04 LTS on the development host.

  • Ubuntu uses dash as the preferred shell. However, we want bash. So, reconfigure /bin/sh to point to /bin/bash instead of /bin/dash:
sudo dpkg-reconfigure dash

Select no when asked if it should link dash to /bin/sh.

  • LTIB has some package dependencies that you have to install on a freshly set up Ubuntu:
sudo apt-get install gcc build-essential zlib1g-dev libncurses-dev m4 bison rpm ccache flex liblzo2-dev uuid-dev gettext libglib2.0-dev git-core libfreetype6-dev
  • LTIB needs sudo permissions to execute rpm commands as root. If this is not set up, LTIB will tell you what to do if it is run the very first time.
  • You probably need access to the serial console (UART1) which is available via the USB-UART converter on X14.
  • We recommend to install a TFTP Server.
  • We recommend as well to set up an NFS Server to be able to mount the target's root file system via NFS.
  • Optionally, you may want to set up a DHCP Server.
  • The i.MX53 is supported by many JTAG debuggers. Config files

Virtual Development Machine (deprecated)

Bluetechnix provides a virtual development machine that comes with pre-installed and pre-compiled software for the CM-i.MX53. It is based on Ubuntu, and ready to allow a System-on-Module boot via TFTP and NFS. You need VirtualBox to run the virtual machine.

For download, please see the Releases section.

Prerequisites

  • You need to have VirtualBox installed. If you are using Ubuntu Linux, install the package named virtualbox-ose. Alternatively, download VirtualBox from the [website https://www.virtualbox.org/].
  • If you want to see the serial terminal output within the VM, be sure that the serial port you want to use is configured in the VirtualBox settings. Default is /dev/ttyUSB0. Be sure that the development board is connected to your host machine (and hence /dev/ttyUSB0 exists) BEFORE you start the VM in VirtualBox. Within the VM, the device is called /dev/ttyS0. You can use the helper script
./serialterm

in the home directory to start Kermit properly.

  • Set network configuration properly if the following does not fit for you:
    • Bridged mode on eth0
    • IP address via DHCP
  • Set your VM's IP address in the configuration file of the TFTP server
/etc/default/tftpd-hpa

Start developing

  • Username and password:
User: bluetechnix
Pass: bluetechnix
  • The Linux BSP is installed in the following directory:
/home/bluetechnix/ltibinstall/ltib

Releases

Support table

SoM / Carrier Board
Feature U-Boot: supported since Linux: supported since Comment
CM-i.MX53-C-C-Q24S1024F4N2048 Rel 1.0 Rel 1.0 Consumer temperature grade, available core clock up to 1 GHz
DEV-i.MX53 Rel 1.0 Rel 1.0 Carrier board for CM-i.MX53
Argos®2D A100 Rel 1.2 Rel 1.2 Camera platform for CM-i.MX53
CM-i.MX53-C-I-Q24S1024F4N2048 Rel 1.3 Rel 1.3 Industrial temperature grade, available core clock up to 800MHz
Qseven-i.MX537 Rel 1.4 Rel 1.4 Qseven V1.2 compliant SoM
EXT-i.MX53-COMM Rel 1.7.0 Rel 1.7.0 Extension board for DEV-i.MX53 and DEV-Qseven-i.MX
CM-i.MX53 System-on-Module
Feature U-Boot: supported since Linux: supported since Comment
LTC3589 PMIC Power-on button Rel 1.0 Hold 1 second to power off cleanly
Ethernet FEC+PHY Rel 1.0 Rel 1.0 Set a valid ethaddr in U-Boot
Eth MAC Address storage in IIM Rel 1.0 Burn fixed MAC address to the i.MX53 fuse box
DDR2-RAM (1GiB) Rel 1.0 Rel 1.0 Verified with memtester in Linux
Audio Codec Rel 1.0 Headphone-Out, Line-In, Mic-In on DEV-i.MX53
SPI NOR Flash 4MiB Rel 1.0 Rel 1.0 Primary boot source
NAND Flash 2GiB Rel 1.0 Rel 1.0 Possible boot source; Use Linux kobs-ng to have bad block support during boot; Default Linux FS: UBIFS
DVFS-CORE Rel 1.0 Dynamic voltage and frequency scaling for ARM Cortex A8 core
Qseven-i.MX537 module
Feature U-Boot: supported since Linux: supported since Comment
LTC3589 PMIC Power-on button Rel 1.4 Hold 1 second to power off cleanly
Ethernet FEC+PHY Rel 1.4 Rel 1.4 Set a valid ethaddr in U-Boot
Eth MAC Address storage in IIM Rel 1.4 Burn fixed MAC address to the i.MX53 fuse box
DDR2-RAM (1GiB) Rel 1.4 Rel 1.4 Verified with memtester in Linux
SPI NOR Flash 4MiB Rel 1.4 Rel 1.4 Primary boot source
NAND Flash 2GiB Rel 1.4 Rel 1.4 se Linux kobs-ng to have bad block support during boot; Default Linux FS: UBIFS
SD card Rel 1.4 Rel 1.4
USB-Hub on USB-Host1 Rel 1.4
Splash screen Rel 1.7.0 HDMI, 1280x720, 60Hz
Development Board DEV-i.MX53
Feature U-Boot: supported since Linux: supported since Comment
ADC Rel 1.0 Battery monitoring, etc.
SD card Rel 1.0 Rel 1.0 Possible boot source
RGB-LED Rel 1.0 Rel 1.0 Linux devices: /sys/class/leds/rgb-X/brightness
USB-Hub on USB-Host1 Rel 1.0
USB-OTG Rel 1.0
CAN Rel 1.0
HDMI Transmitter Rel 1.0 Tested up to UXGA (1600x1200) @ 60Hz
SATA connector Rel 1.0 Rel 1.0 Possible boot source; on-board power supply for 2.5" disks (5V)
3-axis sensor Rel 1.0
Splash screen Rel 1.7.0 HDMI, 1280x720, 60Hz
Development Board DEV-Qseven-i.MX
Feature U-Boot: supported since Linux: supported since Comment
Audio Codec Rel 1.7.0 SGTL5000
LVDS Display Rel 1.7.0 2 connectors available for DualScreen. Display type: Promate
RGB-LED Rel 1.7.0
RTC Rel 1.7.0
USB-OTG Rel 1.7.0
USB at Mini-PCIe connector Rel 1.7.0
SD card Rel 1.7.0 Rel 1.7.0 Possible boot source
Speaker Rel 1.7.0 Beeps when U-Boot starts
Splash screen Rel 1.7.0 HDMI and LVDS supported
Touch panel Rel 1.7.0 2 connectors available, for Promate LVDS displays.
Extension Board EXT-i.MX53-COMM mounted on DEV-i.MX53
Feature U-Boot: supported since Linux: supported since Comment
Acceleration sensor (3-axis) Rel 1.7.0
Bluetooth Rel 1.7.0
ISM camera connector Rel 1.7.0 Note: ISM connectors on development and extension board cannot be active concurrently!
GPS Rel 1.7.0
UMTS/GPS Rel 1.7.0
GSM/GPRS Rel 1.7.0
Gyroscope Rel 1.7.0
Dual LVDS display Rel 1.7.0
Magnetometer Rel 1.7.0
Parallel TFT Display Rel 1.7.0
Capacitive Touch Rel 1.7.0
Wi-Fi Wireless LAN Rel 1.7.0
Extension Board EXT-i.MX53-COMM mounted on DEV-Qseven-i.MX
Feature U-Boot: supported since Linux: supported since Comment
Acceleration sensor (3-axis) Rel 1.7.0
GPS Rel 1.7.0
GSM/GPRS Rel 1.7.0
Gyroscope Rel 1.7.0
Magnetometer Rel 1.7.0
UMTS/GPS Rel 1.7.0
Argos®2D A100 Camera platform
Feature U-Boot: supported since Linux: supported since Comment
SD card Rel 1.2 Rel 1.2 Possible boot source
RGB-LED Rel 1.2 Rel 1.2 Linux devices: /sys/class/leds/rgb-X/brightness
USB-OTG Rel 1.2
HDMI Transmitter Rel 1.2 Tested up to UXGA (1600x1200) @ 60Hz
RTC Rel 1.4
Factory reset pin Rel 1.4
Image Sensor Modules
Feature U-Boot: supported since Linux: supported since Comment
Bluetechnix ISM-MT9M131 Rel 1.1 Live view and capturing, full support by Freescale GStreamer plug-in, fully supported by i.MX53 IPU
Bluetechnix ISM-MT9M025 Rel 1.5 Supported by Freescale GStreamer plug-in, partly supported by i.MX53 IPU. NOTE: Recommended for experienced customers only. The BSP does not contain software for white balancing, color correction, etc. for the Bayer RGB sensor type.
Bluetechnix ISM-MT9P031 Rel 1.6 Supported by Freescale GStreamer plug-in, partly supported by i.MX53 IPU. NOTE: Recommended for experienced customers only. The BSP does not contain software for white balancing, color correction, etc. for the Bayer RGB sensor type.
GStreamer plug-in ismconv Rel 1.6 Converts Bayer-RGB pattern/grayscale images to RGB24 and RGB565 using the ARM NEON coprocessor; for ISM-MT9M025 and ISM-MT9P031 modules
Development support
Feature Supported since Comment
SD card setup script Rel 1.0 Sets up a bootable SD card (setup_sdcard.sh)
NAND flash setup script Rel 1.0 Bootable SD card (see previous script) contains NAND flash setup data (/setup_nand/)
SPI flash/NAND flash setup script Rel 1.2 Bootable SD card (see setup_sdcard.sh) contains SPI flash/NAND flash setup data (/setup_spiflash/). With this configuration, U-Boot and Linux kernel are written to SPI flash, root file system is written to NAND flash.

Binaries

We provide binary images for each release. Image types:

File Type Modules
cmimx53-u-boot-X.Y.bin U-Boot binary. One binary for SPI flash, NAND flash, SD card, SATA disk, and JTAG loading. But be aware, the environment is stored to SPI flash. A dedicated version for NAND flash can be found in /setup_nand/ in the SD-card image, together with scripts for automatic setup. See also cmimx53-sdcard-image-X.Y.bin.bz2 below. CM-i.MX53
qseven-imx537-u-boot-X.Y.bin U-Boot binary. One binary for SPI flash, SATA disk, and JTAG loading. Environment is stored to SPI flash. Qseven-i.MX537
mx53-uImage-X.Y
(cmimx53-uImage-X.Y)
Linux kernel binary (compressed). All
mx53-rootfs-X.Y.tar.bz2
(cmimx53-rootfs-X.Y.tar.bz2)
GNU/Linux root file system. Created from LTIB's rootfs/ directory. Unpack with tar -xjf. All
mx535-rootfs.ubifs-X.Y.img(.bz2)
(cmimx53-rootfs.ubifs-X.Y.img)
GNU/Linux root file system for NAND flash. File system type: UBIFS. Created by LTIB. (BZIP2-compressed in newer releases.) CM-i.MX53-C-C-xxx
mx537-rootfs.ubifs-X.Y.img(.bz2)
(cmimx53-rootfs.ubifs-X.Y_INDUSTRIAL.img)
GNU/Linux root file system for NAND flash. File system type: UBIFS. Created by LTIB. (BZIP2-compressed in newer releases.) CM-i.MX53-C-I-xxx, Qseven-i.MX537
cmimx53-sdcard-image-X.Y.bin.bz2 SD card binary image (compressed) to create a bootable SD card.

SD card contains NAND flash setup files (/setup_nand/) as well as SPI flash setup files (/setup/spiflash/).

For CM-i.MX53-C-I-xxx, you have to replace /setup_nand/rootfs.ubifs.img by mx537-rootfs.ubifs-X.Y.img from above (unpack it with bunzip2 first).

Linux: Unpack with "bunzip2 cmimx53-sdcard-image-X.Y.bin.bz2".
Write to SD card with "dd if=cmimx53-sdcard-image-X.Y.bin of=/dev/sdX bs=1M".

Windows: See here.

CM-i.MX53
qseven-imx537-sdcard-image-X.Y.bin.bz2 SD card binary image (compressed) to create a bootable SD card.

SD card contains NAND flash setup files (/setup_nand/) as well as SPI flash setup files (/setup/spiflash/).

Linux: Unpack with "bunzip2 qseven-imx537-sdcard-image-X.Y.bin.bz2".
Write to SD card with "dd if=qseven-imx537-sdcard-image-X.Y.bin of=/dev/sdX bs=1M".

Windows: See here.

Qseven-i.MX537

Virtual development machine files:

File Type
BLT-CM-i.MX53-VM-relX.Y.rar RAR-compressed archive containing VirtualBox files

Release 1.8.0

Release date
2013-01-17
Supported hardware
CM-i.MX53-C-C-Q24S1024F4N2048
CM-i.MX53-C-I-Q24S1024F4N2048
Qseven-i.MX537
DEV-i.MX53
Argos®2D A100
conga-QEVAL
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.8.0-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Notes
Linux
Added AD9889 HDMI driver: Suspend functionality
Added DEV-Qseven-i.MX V1.1.x development board support
U-Boot
(No changes)
LTIB
Changed wpa_supplicant: Update to 1.0 version (for proper WPA2 support)
Known issues
- SGTL5000 input frequency is wrong

Release 1.7.0

Release date
2012-10-11
Supported hardware
CM-i.MX53-C-C-Q24S1024F4N2048
CM-i.MX53-C-I-Q24S1024F4N2048
Qseven-i.MX537
DEV-i.MX53
Argos®2D A100
conga-QEVAL
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.7.0-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Notes
Linux
Added DEV-Qseven-i.MX carrier board support, see #Support Table
Added EXT-i.MX53-COMM extension board support, see #Support Table
Added Support for EXT-i.MX53-COMM on DEV-Qseven-i.MX, see #Support Table
Fixed pcf2129 RTC driver always reports low battery status
U-Boot
Added Add clearenv_sf environment script
Added Enable HDMI and LVDS in kernel arguments
Added RGB LED support for Qseven module
Added Sample environment scripts for CRAMFS usage
Added Splash screen support
Changed Change default MAC address of Qseven module
Changed DDR Clock to 360MHz for Qseven module
Changed Change default I2C bus in U-Boot to I2C1
Fixed Enable IOMUX Pull-Ups on WP and CD lines of SD interfaces
Fixed Fix Ethernet PHY Reset Pin definition
LTIB
Added build_uboot.sh: Support Qseven module
Added cam-031.sh unit test for ISM-MT9P031 camera module
Added New unit tests: can-send.sh, can-recv.sh, ddr-heavy.sh
Added Package cmimx53-ppp: Installs UMTS/GPRS modem support files in rootfs
Added Package wibear-firmware: Installs firmware for WiBear BT/WiFi module to rootfs
Added setup_sdcard.sh: SD-Card boot for Qseven module
Changed Gst-plugins-base: Enable pango support for *overlay plug-ins
Changed Use more recent minicom version
Fixed Improved unit tests: cam.sh, rtc.sh, cam-131.sh
Known issues
- SGTL5000 input frequency is wrong

Deprecated

Release 1.6

Release date
2012-06-22
Supported hardware
CM-i.MX53-C-C-Q24S1024F4N2048 V1.1 (untested), V2.0
CM-i.MX53-C-I-Q24S1024F4N2048 V1.1 (untested), V2.0
Qseven-i.MX537 V1.0 (untested)
DEV-i.MX53 V1.1 (untested), V1.2
Argos®2D A100 V1.1 (untested), V1.2
conga-QEVAL Rev1.2 (untested)
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.6-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Notes
Linux
Added ISM-MT9M025: Digital binning support in driver
Added ISM-MT9P031 support (driver ism-mt9xx31-camera)
Added satahotplug kernel parameter
Changed ISM-MT9M131 handled by ism-mt9xx31-camera driver (former: ism-mt9m131-camera)
Fixed UART IOMUX settings
U-Boot
Changed DDR SDRAM configuration
LTIB
Added gst-fsl-plugin: Support for grayscale image format (make output format selectable)
Added gst-plugins-bad: ismconv plug-in
Fixed Samba package
Known issues
[none]

Release 1.5

Release date
2012-03-26
Supported hardware
CM-i.MX53-C-C-Q24S1024F4N2048 V1.1, V2.0
CM-i.MX53-C-I-Q24S1024F4N2048 V1.1, V2.0
Qseven-i.MX537 V1.0
DEV-i.MX53 V1.1, V1.2
Argos®2D A100 V1.1
conga-QEVAL Rev1.2
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.5-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Notes
Linux
Added Support for ISM-MT9M025 camera module
Added ISM-MT9M024/25: Added 180° rotate module parameter
Changed ISM-MT9M131: Remove RGB565 configuration option
Changed Include ISM-MT9M025 in default configuration
Fixed AD9889 HDMI driver: Fixed display interface number (Blanking of wrong display interface)
U-Boot
Changed DDR settings for V2.0 SoM
LTIB
Added gst-fsl-plugin: Support for ISM-MT9M025 (make output format selectable)
Added gst-plugins-bad: Update bayer2rgb module to support Bayer GRBG format
Added gst-plugins-base: Include Bayer format support in videorate module
Changed ntpclient: Update to version 2010_365
Known issues
- DDR-SDRAM r/w failures were observed at high load

Release 1.4

Release date
2012-02-13
Supported hardware
CM-i.MX53-C-C-Q24S1024F4N2048 V1.1
CM-i.MX53-C-I-Q24S1024F4N2048 V1.1
Qseven-i.MX537 V1.0
DEV-i.MX53 V1.1, V1.2
Argos®2D A100 V1.1
conga-QEVAL Rev1.2
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.4-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Notes
Linux
Added Qseven-i.MX537 V1.0 support
Added Argos®2D A100 V1.1 support
Added Toshiba LT104AC36000 XGA TFT support
Added PCF2129 RTC driver
Added USBH1.PWR pin implementation
Changed Default color mode of ISM-MT9M131 is now UYVY
U-Boot
Added Qseven-i.MX537 V1.0 support
Added Factory reset pin support (Argos®2D A100 V1.1)
Changed Enable DDR_REFRESH_DOUBLE for CM-i.MX53
LTIB
Added Qseven-i.MX537 support in setup_sdcard.sh
Added Unit tests for HDMI, RTC, LVDS, 2nd SD
Changed qt-x11, qt-embedded .spec files
Known issues
- DDR-SDRAM r/w failures were observed at high load

Release 1.3

Release date
2011-11-28
Supported hardware
CM-i.MX53 V1.1 (CM-i.MX53-C-C-Q24S1024F4N2048, CM-i.MX53-C-I-Q24S1024F4N2048), DEV-i.MX53 V1.1, Argos®2D A100 V1.0
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.3-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Release Note
This is the first release that supports the industrial SoM variant. Please see Linux BSP customization for CM-i.MX53 to configure the software appropriately.
Known issues
- DDR-SDRAM r/w failures were observed at high load

Release 1.2

Release date
2011-10-03
Supported hardware
CM-i.MX53 V1.1 (CM-i.MX53-C-C-Q24S1024F4N2048), DEV-i.MX53 V1.1, Argos®2D A100 V1.0
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.2-L2.6.35_11.05_ER/
Base board support package
Freescale L2.6.35_11.05.01_ER
Known issues
- DDR-SDRAM r/w failures were observed at high load

Release 1.1

Release date
2011-09-23
Supported hardware
CM-i.MX53 V1.1 (CM-i.MX53-C-C-Q24S1024F4N2048), DEV-i.MX53 V1.1
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.1-L2.6.35_11.03_ER/
Base board support package
Freescale L2.6.35_11.03_ER
Known issues
- U-Boot: "update_mmc" script is erroneous
- DDR-SDRAM r/w failures were observed at high load

Release 1.0

Release date
2011-06-21
Supported hardware
CM-i.MX53 V1.0 (CM-i.MX53-C-C-Q24S1024F4N2048), DEV-i.MX53 V1.0
Download path
https://support.becom-group.com/releases/imx/mx53/rel1.0-L2.6.35_11.03_ER/
Base board support package
Freescale L2.6.35_11.03_ER
Known issues
- DDR-SDRAM read failures

Install software sources

  • Download the Lx.x.xx_xx.xx_ER_SOURCE board support package for i.MX processors from the Freescale web site.
    • See the #Releases section for the version of the board support package. You will need exactly the version given for the Bluetechnix patch set to apply cleanly.
    • For downloading, follow this link and open the Board support packages menu.
  • Download the latest Bluetechnix patch set for i.MX53 modules. Click here for downloading.
  • Unpack the Freescale i.MX package:
tar -xzf L2.6.35_11.05.01_ER_source_bundle.tar.gz
tar -xzf L2.6.35_11.03_ER_source_bundle.tar.gz
  • The archive itself contains two archives, Lx.x.xx_xx.xx.xx_ER_docs.tar.gz contains documentation, Lx.x.xx_xx.xx.xx_ER_source.tar.gz contains the source code which we are interested in now.
    • NOTE: The 11.05.01 BSP version additionally contains Linux 1105 patchs.tar.gz. You do not need this file - its content is integrated into the Bluetechnix patch set.
tar -xzf L2.6.35_11.05.01_ER_source.tar.gz
tar -xzf L2.6.35_11.03.00_ER_source.tar.gz
  • Now, we enter the newly created directory, and install LTIB:
cd L2.6.35_11.05.01_ER_source
cd L2.6.35_11.03.00_ER_source
./install
  • Now, you have to accept the license agreement and type a path. We use /home/bluetechnix/ltibinstall/ as the installation path, but you are free to choose another.
  • The next step is to install the Bluetechnix patch set, which adds support for Bluetechnix i.MX53 modules. Unpack the release package now:
tar -xjf cmimx53-ltib-patchset-X.Y.tar.bz2
  • You have to provide the path where you just installed LTIB:
cd cmimx53-ltib-patchset-X.Y
./install /home/bluetechnix/ltibinstall/ltib/
  • IMPORTANT for BSP Releases ≤V1.6: Before we start ltib the first time, please make sure that the directory /opt/freescale is not yet installed (due to earlier LTIB installations etc.). If so, please delete or rename it, e.g.
sudo mv /opt/freescale /opt/freescale_backup
  • Next, we go to LTIB's directory and call ltib the first time. There is a custom configuration file for your i.MX53 module:
cd /home/bluetechnix/ltibinstall/ltib/
./ltib --preconfig config/platform/imx/cmimx53.cf (old releases)
./ltib --preconfig config/platform/imx/cmimx535.cf (CM-i.MX53-C-C-xxx)
./ltib --preconfig config/platform/imx/cmimx537.cf (CM-i.MX53-C-I-xxx)
./ltib --preconfig config/platform/imx/qsevenimx537.cf (Qseven-i.MX537)
  • Now, LTIB installs the packages to /opt/freescale/pkgs, before it opens a configuration dialog. In this dialog, you simply select Exit and Yes (for saving the configuration).
  • Finally, LTIB starts downloading the tool chain, then compiles the Linux kernel and the U-Boot boot loader, and creates the root file system. If everything works, the final message is
Build Succeeded

Trunk sources

After installing the latest released patch set, you may also get the source code for the U-Boot boot loader as well as for the Linux kernel from our GIT server which is the most recent, but beware: That's where our development takes place!


Instructions for the Linux kernel:

  • Make sure you do not have any uncommitted changes in your Linux kernel sources. You may check with
cd rpm/BUILD/linux
git diff
  • Delete all generated files (BEWARE, it will delete *all* files not tracked by GIT):
git clean -fdx
  • Add our GIT server as remote site
git remote add blt-git git://git.becom-group.com/git/imx53-kernel
git remote update
git pull --rebase blt-git master
  • Update the sources
git pull blt-git master
  • Copy the default configuration file
cp arch/arm/configs/imx5_defconfig .config


Instructions for U-Boot:

  • If rpm/BUILD/u-boot-2009.08 does not exist yet, you have to unpack the U-Boot sources first:
./ltib -m prep -p u-boot
  • Make sure you do not have any uncommitted changes in your U-Boot sources. You may check with
cd rpm/BUILD/u-boot-2009.08
git diff
  • Delete all generated files (BEWARE, it will delete *all* files not tracked by GIT):
git clean -fdx
  • Add our GIT server as remote site
git remote add blt-git git://git.becom-group.com/git/imx53-u-boot
git remote update
git pull --rebase blt-git master
  • Update the sources
git pull blt-git master


Releases

  • Releases are marked as tags in both GIT repositories.
  • To get a list of available tags, do
$ git tag
...
rel1.5
rel1.6
  • To checkout a release tag, do
$ git checkout rel1.6

The U-Boot boot loader

The main task for the boot loader is to initialize hardware appropriately (especially the RAM), and to load the Linux kernel. Via environment variables, you can configure U-Boot as you wish: Network settings, where to load the Linux kernel from, set up the kernel's command line, etc.

In most cases, you will not need to change and recompile U-Boot, but simply alter the environment variables so that U-Boot's behaviour fits your needs.

U-Boot development

U-Boot sources are unpacked in the following directory within LTIB:

rpm/BUILD/u-boot-2009.08/

If you do not have this directory, you can tell LTIB to unpack the sources for you. Patches are automatically applied.

./ltib -m prep -p u-boot

The following script (re-)compiles U-Boot and installs the u-boot.bin image in /tftpboot as well. We assume that your working directory is ltib/.

./build_uboot.sh

U-Boot for different boot sources

The U-Boot binary supports various boot sources: SPI flash, NAND flash, SD card, SATA hard disk.

To install U-Boot to one of these (out of Linux), you simply copy it to the start of the media, e.g.

dd if=u-boot.bin of=/dev/mmcblk0

Note that u-boot.bin contains 1kbytes padding on its beginning. This way, partition tables, as mostly present on SD or SATA, will not overwrite U-Boot. (But: Writing U-Boot anywhere as shown above WILL overwrite your partition table!)

To install U-Boot without overwriting the partition table, use command

dd if=u-boot.bin of=/dev/mmcblk0 bs=1K seek=1 skip=1

Environment storage

One must decide where the U-Boot environment is saved at compile time. The default is SPI-NOR flash, because it is always available.

You can use our U-Boot compile script to chose where the environment is stored.

./build_uboot.sh nand
./build_uboot.sh mmc
./build_uboot.sh sata

Linux loading and parameters

Set the U-Boot variable bootcmd according to your wishes:

  • set bootcmd run bootcmd_net
Loads the uImage via TFTP, then Linux kernel must receive a DHCP address, and mounts the rootfs via NFS
IMPORTANT: If you want to mount the rootfs via NFS, you must not configure the network, because the NFS connection would get interrupted. You can do this in LTIB's configuration window under "Target System Configuration" "Options" --> "start networking" (switch off).
  • set bootcmd run bootcmd_net_dhcp
Same as above, except that U-Boot gets an IP address via DHCP.
  • set bootcmd run bootcmd_mmc
Loads uImage from SD card, Linux rootfs comes from ext3 partition on SD card
  • set bootcmd run bootcmd_nand
Loads uImage from NAND flash, Linux rootfs comes from UBIFS partition on NAND
  • set bootcmd run bootcmd_nand_cramfs
Loads uImage from NAND flash, Linux rootfs comes from CRAMFS image in NAND. Cramfs is a read-only file system.
  • set bootcmd run bootcmd_spi
Loads uImage from SPI flash, Linux rootfs comes from UBIFS partition on NAND

Updating

NOTE: You can also update U-Boot from Linux. Here, we talk about updating U-Boot with a running U-Boot.

You need to have your network configured. Set at least ipaddr, serverip, and ethaddr (if you haven't written a valid MAC address to IIM). The same U-Boot binary (u-boot.bin) is used for NAND flash, SPI flash, SD/MMC card, and SATA.

  • NAND flash:
run update_nand
NOTE: The recommended way to update NAND flash U-Boot is to use the kobs-ng application in Linux. If updating with U-Boot, there is no support for NAND bad blocks during i.MX boot.
  • SPI flash:
run update_sf
  • SD/MMC card:
run update_mmc

Linux kernel development

Freescale provides a good reference off all i.MX related device drivers

  • i.MX53 START Linux BSP Reference Manual
  • You can find it in the Lx.x.x_xx.xx.xx_ER_docs.tar.gz archive


Linux kernel sources are unpacked by default and can be found in

ltib/rpm/BUILD/linux

If you are developing within the Linux kernel, you will need the following steps frequently (we assume that your working directory is ltib/rpm/BUILD/linux):

  • Set some environment variables for cross-compiling so that "make" will do what is expected:
. set_cross_envs
  • Change the kernel configuration:
make menuconfig
  • Store your current config:
cp .config arch/arm/configs/imx5_defconfig

We recommend to re-compile the kernel after any changes by using LTIB - it takes care of installing modules correctly. We assume that your working directory is ltib/. The following script is for kernel compilation. It installs the uImage compressed image in /tftpboot for loading via TFTP as well.

./build_kernel.sh

Deployment

In the main ltib folder, you will find a Linux shell script for deployment:

setup_sdcard.sh <SD card's device file>

Depending on boot modes that your module/base board is capable of, you may choose one of the following ways to deploy a running embedded Linux system to your MX53 module.


Instructions for deployment onto/boot from SD card

Sets up a bootable SD card on your PC. Linux runs directly from this SD card on the MX53 module.

  • Insert an SD card into your Linux PC
  • Execute ./setup_sdcard.sh and provide the SD card's device file (e.g. /dev/sde or /dev/mmcblk0) as argument
  • This will take a while, so please wait patiently.
  • Insert the SD card into the base board.
  • Set the base board to SD card boot mode and power up the module.
    • If your base board does not support SD card boot, boot U-Boot from the default source (usually SPI-NOR flash). Stop autoboot by pressing any key. To load Linux from the SD Card, now enter
run bootcmd_mmc
  • If you have attached a monitor/LCD to the primary display device, you will see the Linux frame buffer console there.


Instructions for deployment onto/boot from SPI-NOR flash

Sets up a bootable SD card on your PC that contains SPI-NOR/NAND flash setup data. You must first boot your MX53 module from this SD card and set up the on-board flash. Afterwards, you are able to boot from SPI-NOR. The setup will write the boot loader U-Boot and the Linux kernel image to SPI-NOR flash, and will write the Linux root file system to the NAND flash.

  • Insert an SD card into your Linux PC
  • Execute ./setup_sdcard.sh and provide the SD card's device file (e.g. /dev/sde or /dev/mmcblk0) as argument
  • This will take a while, so please wait patiently.
  • Insert the SD card into the base board.
  • Set the base board to SD card boot mode and power up the module.
    • If your base board does not support SD card boot, boot U-Boot from the default source (usually SPI-NOR flash). Stop autoboot by pressing any key. Then enter
run bootcmd_mmc
  • The module will boot Linux from the SD card.
  • Connect a USB cable to access the serial port (UART) of the base board.
  • Log in by entering
root
  • Now set up the SPI-NOR flash with the provided script (Attention: This will also update the boot loader in the SPI-NOR flash!)
cd /setup_spiflash
./setup_spiflash.sh
  • You will receive the following message if setup is complete
=== Setup successful!
  • Shut down Linux now
poweroff
  • Remove power from the board and change the boot mode to SPI-NOR. Deployment is complete now!


Instructions for deployment onto/boot from NAND flash

Sets up a bootable SD card on your PC that contains NAND flash setup data. You must first boot your MX53 module from this SD card and set up the on-board flash. Afterwards, you are able to boot from NAND. The setup will write the boot loader U-Boot, the Linux kernel image, and the Linux root file system to the NAND flash.

Note that we use different types of NAND flashes on our MX53 modules. Read the Linux BSP customization for <your module> document on how to set up LTIB properly.

  • Insert an SD card into your Linux PC
  • Execute ./setup_sdcard.sh and provide the SD card's device file (e.g. /dev/sde or /dev/mmcblk0) as argument
  • This will take a while, so please wait patiently.
  • Insert the SD card into the base board.
  • Set the base board to SD card boot mode and power up the module.
    • If your base board does not support SD card boot, boot U-Boot from the default source (usually SPI-NOR flash). Stop autoboot by pressing any key. Then enter
run bootcmd_mmc
  • The module will boot Linux from the SD card.
  • Connect a USB cable to access the serial port (UART) of the base board.
  • Log in by entering
root
  • Now set up the NAND flash with the provided script (Attention: This will also update the boot loader in the NAND flash!)
cd /setup_nand
./setup_nand.sh
  • You will receive the following message if setup is complete
=== NAND setup successful!
  • Shut down Linux now
poweroff
  • Remove power from the board and change the boot mode to NAND. Deployment is complete now!


Instructions for deployment onto/boot from SATA

Procedure is similar to setting up an SD card with your PC, see #Instructions for deployment onto/boot from SD card.

Note that MX53 fuses must be set up prior booting from SATA. See #SATA.


Boot Linux from TFTP/NFS

Gets the Linux kernel image via TFTP from your PC. Mounts the Linux root file system (ltib/rootfs/) transparently from your PC. You need a working Ethernet connection to your PC.

  • Boot U-Boot on your MX53 module from the default source (usually SPI-NOR flash). Stop autoboot by pressing any key. Then enter
run bootcmd_net
  • U-Boot will now load the kernel image (uImage) from your PC and boot it.
  • The Linux kernel will configure network and mount the rootfs via NFS.
  • For the default network configuration and how to modify it, please see #Network configuration.
  • You must not shut down the eth0 network device in Linux or interrupt the Ethernet connection!


Other combinations

Individual combinations are possible as well. Please see the setup_sdcard.sh script and modify it according to your wishes.


MfgTool

Bluetechnix also supports Freescale's Manufacturing Tool (MfgTool) for programming modules in mass-production. Please see MfgTool (i.MX53).

Knowledge base

In alphabetical order.

Acceleration sensor (3-axis) MMA7660

{{#if: DEV-i.MX53 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≥V1.0 (default: DNP!)
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Load the kernel module
modprobe mma7660
  • If it fails, you may assume that the driver is compiled into the kernel. (This is at least valid for SW Rel. 1.0.)
  • There are two demo applications from the mmatools package which are of use:
xup_demo

(Detects rotation of the device)

gstest

(Constant read-out)

Acceleration sensor (3-axis) MMA8453

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Load the kernel module
modprobe mxc_mma8453
  • There is one demo applications from the mmatools package which is of use:
gstest
(Constant read-out)
  • You can use the
evtest
application to read out the event device (usually /dev/input/event0 if no other input device is connected/loaded).
  • To select evtest for compilation, go to the LTIB configuration dialog
./ltib -c
Package list  --->
[*] evtest

Analog Digital Converter

{{#if: DEV-i.MX53 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • See the Hardware User Manual for input channels
  • The driver is compiled as a kernel module, to load, type
modprobe ad799x
  • Linux abstraction layer
cat /sys/bus/iio/devices/device0/in[0..3]_raw

A read from these device files start a conversion and displays the raw value (0...4092 = 0...3.3V).

  • Unit test (Do not connect a battery):
/unit_tests/bluetechnix/adc.sh
  • A sample C application for measuring the voltage of the battery:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv)
{
	FILE *adcsys = (FILE*) -1;
	char content[5];
	double voltage;
	long value;
	
	while (1) {
		sleep(1);
		adcsys = fopen("/sys/bus/iio/devices/device0/in2_raw", "r"); (DEV-i.MX53 V1.0) 
		adcsys = fopen("/sys/bus/iio/devices/device0/in1_raw", "r"); (DEV-i.MX53 >= V1.1) 
		if (adcsys == (FILE*) -1) {
			fprintf(stderr, "Error opening sys file\n");
			continue;
		}
		if (fread((void*)content, 4, 1, adcsys) != 1) {
			fprintf(stderr, "Error reading sys file\n");
			continue;
		}
		fclose(adcsys);
		adcsys = (FILE*) -1;
		value = strtol(content, NULL, 10);
		value >>= 2;
		voltage = (double)value / 1024.0    * 3.3         * 13.0 / 3;
		/*                        ^max.value  ^ref.voltage  ^volt.divider */
		printf("Battery voltage: %f\n",voltage);
	}
	return 0;
}

Audio Codec

{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Simple unit test (interactive, connect Mic-In and Headphone-Out)
/unit_tests/bluetechnix/audio.sh

Backlight Control for LCDs

{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
conga-QEVAL   Rev. 1.2
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • The LCD backlight is regulated with a PWM output.
  • In Linux, the driver pwm-backlight is used
  • To control backlight intensity, write any value between 0 (off) and 255 (brightest) to the SYSFS control file
/sys/devices/platform/pwm-backlight.0/backlight/pwm-backlight.0/brightness
  • Default settings: 200 Hz PWM frequency, 100% duty cycle (valid for Toshiba LT104AC36000 display)
  • Linux platform file entry (e.g. linux/arch/arm/mach-mx5/mx53_qseven.c):
static struct platform_pwm_backlight_data mxc_pwm_backlight_data = {
	.pwm_id = 0,
	.max_brightness = 255,
	.dft_brightness = 255, /* default: 100% brightness */
	.pwm_period_ns = 5000000, /* toshiba */
};

Battery charger

{{#if: DEV-i.MX53 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≤V1.1
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

The battery charger is able to charge 11.1V Li-Po 3-cell batteries. It is enabled by default in software. The maximum charge current is 2.0A.

The charger can be disabled by setting GPIO CHARGER_SHDN (refer to linux/arch/arm/mach-mx5/cmimx53.c) to low.

There is no device driver or software interaction for the battery charger. However, an application must take care that the battery is not run down below its minimum voltage (usually 9V). Battery voltage can be measured with the on-board ADC.

Bluetooth

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Select packages
Package list  --->
  [*] firmware-wibear
  [*] bluez-hcidump                                                     
  [*] bluez-utils 
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build bluez-hcidump and bluez-utils now.


Test in Linux
  • Connect a Bluetooth antenna to X12.
  • Load kernel modules:
modprobe btmrvl_sdio
modprobe btsdio
modprobe l2cap
modprobe rfcomm
modprobe hidp
  • Check if Bluetooth interface was detected
hciconfig
hci0:	Type: UKNW
	BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
	DOWN 
	RX bytes:0 acl:0 sco:0 events:0 errors:0
	TX bytes:0 acl:0 sco:0 commands:0 errors:0
  • Active the interface (use device identifier from above, in red)
hciconfig hci0 up
  • Show all information
hciconfig -a hci0
hci0:	Type: UKNW
	BD Address: 00:06:C6:27:02:A8 ACL MTU: 1021:7 SCO MTU: 240:3
	UP RUNNING PSCAN ISCAN 
	RX bytes:421 acl:0 sco:0 events:13 errors:0
	TX bytes:101 acl:0 sco:0 commands:12 errors:0
	Features: 0xff 0xef 0x8d 0xfe 0x9b 0xff 0x79 0x83
 	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV3 
	Link policy: 
	Link mode: SLAVE ACCEPT 
	Name: 
	Class: 0x000000
	Service Classes: Unspecified
	Device Class: Miscellaneous, 
	HCI Ver:  (0x4) HCI Rev: 0x8300 LMP Ver:  (0x4) LMP Subver: 0x501
	Manufacturer: not assigned (72)
  • Scan for other devices
hcitool -i hci0 scan
Scanning ...
	90:21:55:A8:2A:8E	DeviceName
  • Get surrounding device addresses and classes
hcitool inq
Inquiring ...
	90:21:55:A8:2A:8E	clock offset: 0x78ea	class: 0x5a020c
  • Get info on a device (use device identifier from above, in green)
hcitool info 90:21:55:A8:2A:8E
Requesting information ...
 	BD Address:  90:21:55:A8:2A:8E
  	Device Name: DeviceName
 	LMP Version:  (0x4) LMP Subversion: 0x4217
 	Manufacturer: Broadcom Corporation (15)
 	Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
  	[...]

Camera module ISM-AR0132AT

{{#if: Qseven-i.MX537 ||}}{{#if: DEV-i.MX53 ||}}{{#if: Argos®2D A100 ||}}{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
DEV-i.MX53   ≥V1.0
Argos®2D A100   ≥V1.0
EXT-i.MX53-COMM   ≥V1.0
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Kernel module
ism-mt9m024_camera.ko
  • Note: For BSP versions ≤v1.8.0, you have to re-compile the kernel.
cd rpm/BUILD/linux
source set-cross-envs
make menuconfig

Choose

Device Drivers  --->
  <*> Multimedia support  --->
    [*]   Video capture adapters  --->
      MXC Camera/V4L2 PRP Features support  --->
        Select camera chip on ISM-MT9M024/25 (Aptina MT9M024)  --->
          (X) Aptina MT9M024

Run

cd ../../..
./build_kernel.sh

Camera module ISM-MT9M024/5

{{#if: Qseven-i.MX537 ||}}{{#if: DEV-i.MX53 ||}}{{#if: Argos®2D A100 ||}}{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
DEV-i.MX53   ≥V1.0
Argos®2D A100   ≥V1.0
EXT-i.MX53-COMM   ≥V1.0
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Kernel module
ism-mt9m024_camera.ko
  • Kernel module parameters
    • testpattern: Test pattern: 0=disable (default), 1=solid color, 2=color bar, 3=fade-to-gray color bar, 4=walking 1s
    • autoexposure: Auto exposure: 0=disable, 1=enable (default)
    • hdrmode: High dynamic range mode: 0=disable (default), 1=enable
    • sensorwidth: Sensor width, default 1280
    • sensorheight: Sensor height, default 960
    • datawidth: Data width: 8 (default), 10 bits
    • rotate: Rotate by 180°, 0=no (default), 1=yes
    • binning: Enable digital binning for resolutions of VGA or smaller, 0=no, 1=yes (default)


  • To use the ISM-MT9M024/5 on the EXT-i.MX53-COMM board, you have to configure U-Boot's bootargs variable.
setenv bootargs_base $(bootargs_base) cam=ext-comm
saveenv


  • 8-BPP test in Linux:
modprobe ism-mt9m024-camera
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_capture.out -iw 1280 -ow 1280 -ih 960 -oh 960 -i 1 -fr 25 -f "GREY" -c 100 video8bpp.raw

Note: Type "/unit_tests/mxc_v4l2_capture.out -help" to see the command help.

  • 10-BPP test in Linux:
modprobe -r ism-mt9m024-camera
modprobe ism_mt9m024_camera datawidth=10
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_capture.out -iw 1280 -ow 1280 -ih 960 -oh 960 -i 1 -fr 25 -f "Y16 " [ -c 100] video16bpp.raw

Note: 10-BPP data from the camera is stored as 16-BPP, MSB aligned and extended.

  • Unit test:
/unit_tests/bluetechnix/cam.sh
  • Live view with GStreamer (Monochrome camera):
WIDTH=1280
HEIGHT=720
modprobe ism-mt9m024-camera rotate=1 sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=25 color-mode=1 capture-mode=5 ! ismconv ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT &

Note: The color-mode parameter to mfw_v4lsrc determines the data format of the camera. "1" means gray scale. Type "gst-inspect mfw_v4lsrc" to see all options.

  • Live view with GStreamer (Bayer RGB camera):
WIDTH=1280
HEIGHT=720
modprobe ism-mt9m024-camera rotate=1 sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=25 color-mode=2 capture-mode=5 ! ismconv ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT &

Note: The color-mode parameter to mfw_v4lsrc determines the data format of the camera. "2" means Bayer pattern in GRBG format. Type "gst-inspect mfw_v4lsrc" to see all options.

Camera module ISM-MT9M131

{{#if: Qseven-i.MX537 ||}}{{#if: DEV-i.MX53 ||}}{{#if: Argos®2D A100 ||}}{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
DEV-i.MX53   ≥V1.0
Argos®2D A100   ≥V1.0
EXT-i.MX53-COMM   ≥V1.0
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}


Overview
  • The camera supports SXGA (1280x1024) at 15 fps, VGA (640x480) at 30 fps.
  • The Linux device driver uses the camera chip in YUV mode.
  • Live view and capturing is fully supported by i.MX53 hardware (because the camera sends YUV and no Bayer RGB pattern).


Assembling

When assembling, be sure to use connector i.MX of the ISM-MT9M131!


Linux device driver
  • Kernel module (Linux BSP ≤ V1.5)
ism-mt9m131_camera.ko
  • Kernel module (Linux BSP ≥ V1.6)
ism-mt9xx31_camera.ko
  • Kernel module parameters
    • testpattern: Test pattern: 0=disable (default), 1..7=different test patterns
    • sensorwidth: Sensor width, default 1280
    • sensorheight: Sensor height, default 1024


Operation
  • Live view using GStreamer (HD720 resolution @ 22 fps):
WIDTH=1280
HEIGHT=720
modprobe -r ism_mt9xx31_camera
modprobe ism_mt9xx31_camera sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=22 capture-mode=5 ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT
  • Live view (SVGA resolution @ 25 fps):
WIDTH=800
HEIGHT=600
modprobe -r ism_mt9xx31_camera
modprobe ism_mt9xx31_camera sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_overlay.out -iw $WIDTH -ow $WIDTH -ih $HEIGHT -oh $HEIGHT -fr 25 -fg

Note: Maximum fps at this resolution is 40fps.

  • Capture test in Linux (XGA resolution, 15 fps, 100 frames):
WIDTH=1024
HEIGHT=768
modprobe -r ism_mt9xx31_camera
modprobe ism_mt9xx31_camera sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_capture.out -iw $WIDTH -ow $WIDTH -ih $HEIGHT -oh $HEIGHT -fr 15 -c 100 vid_mt9m131.yuv
  • You may play this file with mplayer on your host machine:
mplayer -demuxer rawvideo -rawvideo fps=15:w=1024:h=768 vid_mt9m131.yuv
  • Unit test:
/unit_tests/bluetechnix/cam-131.sh


EXT-i.MX53-COMM
  • To use the ISM-MT9M131 on the EXT-i.MX53-COMM board, you have to configure U-Boot's bootargs variable.
setenv bootargs_base $(bootargs_base) cam=ext-comm
saveenv

Camera module ISM-MT9P031

{{#if: Qseven-i.MX537 ||}}{{#if: DEV-i.MX53 ||}}{{#if: Argos®2D A100 ||}}{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
DEV-i.MX53   ≥V1.0
Argos®2D A100   ≥V1.0
EXT-i.MX53-COMM   ≥V1.0
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Kernel module
ism-mt9xx31_camera.ko

Note: This driver handles ISM-MT9M131 and ISM-MT9P031 cameras.

  • Kernel module parameters
    • testpattern: Test pattern: 0=disable (default), 1=Color field, 2=Horizontal gradient, 3=Vertical gradient, 4=Diagonal gradient, 5=Classic test pattern, 6=Walking 1s, 7=Monochrome horizontal bars, 8=Monochrome vertical bars, 9=Vertical color bars
    • sensorwidth: Sensor width, default 2592
    • sensorheight: Sensor height, default 1944
    • datawidth: Data width: 8 (default), 10 bits
    • rotate: Rotate by 180°, 0=no (default), 1=yes
    • shutterwidth: Shutter width, default (sensorheight-1)


  • To use the ISM-MT9P031 on the EXT-i.MX53-COMM board, you have to configure U-Boot's bootargs variable.
setenv bootargs_base $(bootargs_base) cam=ext-comm
saveenv


  • 8-bit test in Linux (max. sensor resolution)
modprobe ism-mt9xx31-camera sensorwidth=2592 sensorheight=1944
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_capture.out -iw 2592 -ow 2592 -ih 1944 -oh 1944 -i 1 -fr 5 -f "GREY" -c 100 video8bpp.raw

Note: Type "/unit_tests/mxc_v4l2_capture.out -help" to see the command help.


  • 10-bit test (max. sensor resolution)
modprobe -r ism-mt9xx31-camera
modprobe ism_mt9xx31_camera datawidth=10 sensorwidth=2592 sensorheight=1944
modprobe mxc_v4l2_capture
/unit_tests/mxc_v4l2_capture.out -iw 2592 -ow 2592 -ih 1944 -oh 1944 -i 1 -fr 5 -f "Y16 " -c 100 video16bpp.raw


  • Live view with GStreamer (Monochrome camera):
WIDTH=1280
HEIGHT=720
modprobe -r ism-mt9xx31-camera
modprobe ism-mt9xx31-camera sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=25 color-mode=1 capture-mode=5 ! ismconv ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT

Note: The color-mode parameter to mfw_v4lsrc determines the data format of the camera. "1" means gray scale. Type "gst-inspect mfw_v4lsrc" to see all options.

Note 2: The mfw_v4lsrc GStreamer plug-in allows a maximum capture size of 1768x1168 pixels.


  • Live view with GStreamer (Bayer RGB camera):
WIDTH=1280
HEIGHT=720
modprobe -r ism-mt9xx31-camera
modprobe ism-mt9xx31-camera sensorwidth=$WIDTH sensorheight=$HEIGHT
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=25 color-mode=3 capture-mode=5 ! ismconv ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT

Note: The color-mode parameter to mfw_v4lsrc determines the data format of the camera. "3" means RGB pixels arranged with Bayer RGGB pattern. Type "gst-inspect mfw_v4lsrc" to see all options.

Note 2: The ismconv GStreamer plug-in does not do white balancing nor gamma correction.


  • Live view with GStreamer (Bayer RGB camera), Rotate mode:
WIDTH=1280
HEIGHT=720
modprobe -r ism-mt9xx31-camera
modprobe ism-mt9xx31-camera sensorwidth=$WIDTH sensorheight=$HEIGHT rotate=1
modprobe mxc_v4l2_capture
gst-launch -e mfw_v4lsrc capture-width=$WIDTH capture-height=$HEIGHT fps-n=25 color-mode=4 capture-mode=5 ! ismconv ! mfw_v4lsink disp-width=$WIDTH disp-height=$HEIGHT

Note: color-mode "4" means RGB pixels arranged with Bayer BGGR pattern. If rotation (i.e. horizontal and vertical mirror) is enabled, the Bayer pattern changes to BGGR.

CAN

{{#if: DEV-i.MX53 ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≥V1.0
conga-QEVAL   
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Set the bit rate in Linux
echo 125000 > /sys/devices/platform/FlexCAN.0/bitrate

(default is 500000, maximum is 1000000)

  • We have tested CAN communication with our Blackfin Boards! See here for the Blackfin How-To. We used the SocketCAN utilities in Linux on both platforms.
  • Turning on the interface
ifconfig can0 up
  • Receive:
for i in `seq 1 100`; do cantest can0; done
  • Send:
for i in `seq 1 50`; do cantest can0 123#AABBCCDD; usleep 1000; cantest can0 1F334455#1122334455667788; usleep 1000; done

Clock Output (CLKO)

{{#if: Qseven-i.MX537 ||}}{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

To enable CLKO output on the module's pin GPIO.(3V3)_3, in U-Boot, type the following command (or add it to your boot script):

mw.l 0x53fa8020 0x2

DDR-SDRAM

{{#if: Qseven-i.MX537 ||}}{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

Unit test

/unit_tests/bluetechnix/ddr-ram.sh


DDR Double Refresh Rate

The DDR SDRAM chips on the i.MX53 modules require to double the refresh rate for a case temperature of 85°C and higher.

A #define in U-Boot's platform-dependent configuration file (include/configs/) controls static enable/disable of this feature.

/* DDR: Tcase > 85°C requires doubling the refresh rate */
#define DDR_REFRESH_DOUBLE

It is available since MX53 Linux BSP Release 1.4 (or in GIT sources since 2011-12-19). Enabling double refresh rate leads to a DDR performance decrease of about 3%.

Display (LVDS)

{{#if: conga-QEVAL ||}}{{#if: EXT-i.MX53-COMM ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
conga-QEVAL   Rev. 1.2
EXT-i.MX53-COMM   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

To activate the MX53 on-chip LDB (LVDS Display Bridge), you have to configure U-Boot's bootargs variable.

Two displays are supported in the BSP:

  • Toshiba LT104AC36000
  • Promate 97G104S2N2F-2


LVDS0
To use interface LVDS0, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB666,TOSHIBA-XGA di0_primary ldb=single,di=0,ch0_map=SPWG'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB24,PROMATE-SVGA di0_primary ldb=single,di=0,ch0_map=SPWG devq7imx'
and
saveenv
to make changes persistent.
LVDS1
To use interface LVDS1, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi1fb:RGB666,TOSHIBA-XGA di1_primary ldb=single,di=1,ch1_map=SPWG'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi1fb:RGB24,PROMATE-SVGA di1_primary ldb=single,di=1,ch1_map=SPWG devq7imx'
and
saveenv
to make changes persistent.
Dual display clone mode
To use interface LVDS0 and LVDS1 in clone mode, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB666,TOSHIBA-XGA di0_primary ldb=dual,di=0,ch1_map=SPWG,ch0_map=SPWG'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB24,PROMATE-SVGA di0_primary ldb=dual,di=0,ch1_map=SPWG,ch0_map=SPWG devq7imx'
and
saveenv
to make changes persistent.
Dual display separate mode
To use interface LVDS0 and LVDS1 in separate mode, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB666,TOSHIBA-XGA video=mxcdi1fb:RGB666,TOSHIBA-XGA di0_primary ldb=separate,di=0,di=1,ch0_map=SPWG,ch1_map=SPWG'
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB24,PROMATE-SVGA video=mxcdi1fb:RGB24,PROMATE-SVGA di0_primary ldb=separate,di=0,di=1,ch0_map=SPWG,ch1_map=SPWG devq7imx'
and
saveenv
to make changes persistent.


Note that TOSHIBA-XGA is a video mode defined in the platform file, e.g., linux/arch/arm/mach-mx5/mx53_qseven.c:

static struct fb_videomode video_modes[] = {
[...]
	{
		/* Toshiba LVDS TFT 1024x768 */
		"TOSHIBA-XGA", 60, 1024, 768, 15384,
		136, 24,
		33, 3,
		160, 2,
		FB_SYNC_CLK_LAT_FALL,
		FB_VMODE_NONINTERLACED,
		0,
	},
[...]

PROMATE-SVGA is one as well.


For a custom display, you will have to adapt

  • The color format
    • here: RGB666
    • possible: RGB666 (LVDS 18-bit mode), RGB24 (LVDS 24-bit mode), BGR24, ...
  • The timing
    • here: TOSHIBA-XGA
    • possible: implement your own video_mode as above; or use a VESA-calculated timing, e.g. 1024x768M@60
  • The LVDS bit mapping
    • here: SPWG
    • possible: SPWG (18, 24 bit), JEIDA (24 bit)
    • See the i.MX53 Reference Manual

Display (Parallel)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM    ≥V1.0
   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

NOTE: The following example is valid for the displays EDT ET0500G0DH6 and EDT ETM035G0DH6


ET0500G0DH6
To use the display ET0500G0DH6, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB666,EMERGING-WVGA di0_primary'
ETM035G0DH6
To use the display ETM035G0DH6, type the following in U-Boot
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 console=tty1 video=mxcdi0fb:RGB666,EMERGING-QVGA di0_primary'


Note that EMERGING-QVGA and EMERGING-WVGA are video modes defined in the platform file, e.g., linux/arch/arm/mach-mx5/cmimx53.c:

static struct fb_videomode video_modes[] = {
[...]
       {
		/* Emerging TFT 320x240 */
		"EMERGING-QVGA", 60, 320, 240, 153846, 
		20, 68,
		4, 18,
		1, 1,
		0,
		FB_VMODE_NONINTERLACED,
		0,
	},
	{
		/* Emerging TFT 800x480 */
		"EMERGING-WVGA", 60, 800, 480, 30060,
		88, 40,
		33, 10,
		128,2,
		0,
		FB_VMODE_NONINTERLACED,
		0,
	},
[...]

Dynamic Voltage and Frequency Scaling (DVFS)

{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • DVFS-CORE is compiled by default, but not enabled.
  • To enable it in Linux, do the following:
echo 1 > /sys/devices/platform/mxc_dvfs_core.0/enable
  • Disable:
echo 0 > /sys/devices/platform/mxc_dvfs_core.0/enable
  • If DVFS-CORE is enabled, the CPU voltage (PMIC SW1) is regulated between 950mV and 1250mV, the CPU frequency is regulated between
    • 160MHz and 1000MHz (BSP Rel. <= 1.1)
    • 400MHz and 1000MHz (BSP Rel. >= 1.2)
  • View statistics about how much time the CPU spends in working points
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
  • Unit test
/unit_tests/bluetechnix/dvfs.sh

Ethernet

{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
conga-QEVAL   
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • You can assign a fixed MAC address to a SoM by blowing some fuses on the i.MX53. Do the following in U-Boot:
iim blow fecmac 0x00:0x01:0x02:0x03:0x04:0x05

(This cannot be changed afterwards!)

  • Unit test for Linux (You must have TFTP server running on 192.168.1.1 which provides the file 1MBrandomfile for the test to be successful):
/unit_tests/bluetechnix/ethernet.sh
  • U-Boot default network configuration:
    • IP address 192.168.1.5
    • Server IP address 192.168.1.1
    • MAC address 02:00:DE:AD:BE:EF

Fan Control

{{#if: Qseven-i.MX537 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Fan Control is defined by Qseven® Standard
  • FAN_CTRL is a PWM Output
  • Linux BSP for Qseven-i.MX537 uses pwm-backlight driver to control PWM signal
    • Default settings: 25kHz PWM frequency, 50% duty cycle
  • To control the PWM duty cycle, write a number between 0 and 100 to sysfs file (Value corresponds to duty cycle in percent):
/sys/devices/platform/pwm-backlight.1/backlight/pwm-backlight.1/brightness

Flash memory (NAND)

{{#if: Qseven-i.MX537 ||}}{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}


U-Boot
  • Work with NAND flash in U-Boot: Type nand, you will get a list of commands.
  • How can I verify U-Boot is written correctly?
run update_nand
nand read 0xb0800000 0x0 0x100000
cmp.b 0x70800000 0xb0800000 0x100000


Linux
  • Write to NAND in Linux: Use nandwrite program.
  • If you want to program U-Boot to NAND, use the kobs-ng program. See script setup_nand.sh for example usage. (kobs-ng programs the boot loader to NAND flash and creates the FCB needed by the i.MX53 boot ROM).
  • There is a unit test in Linux (ATTENTION: It overwrites /dev/mtdblock6)
/unit_tests/bluetechnix/nand.sh
  • How to set up the NAND flash with U-Boot, Linux, and rootfs?

1. Use the script

setup_sdcard.sh

(in ltib/ installation folder) to set up a bootable SD card. The SD card will contain NAND installation images.

2. Boot the i.MX53 module from the newly created SD card, go to folder

cd /setup_nand

and execute

./setup_nand.sh
  • You may mount the NAND rootfs partition (/dev/mtd4) which is formatted with UBIFS this way:
ubiattach /dev/ubi_ctrl -m 4
mount -t ubifs ubi0:rootfs /mnt/cdrom

Flash memory (SPI NOR)

{{#if: Qseven-i.MX537 ||}}{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Unit test
/unit_tests/bluetechnix/spiflash.sh
  • Write to SPI-NOR in Linux: Use dd.
  • U-Boot access example:
sf probe 1
sf erase 0x0 0x400000
mw.b 0xb0000000 0x36 0x400000
sf write 0xb0000000 0x0 0x400000
sf read 0xb0400000 0x0 0x400000
cmp.b 0xb0000000 0xb0400000 0x400000
  • Delete/reset U-Boot environment
    • If your U-Boot environment comes from SPI flash and you want to reset it, you have to delete memory area with length 0x20000 bytes and at offset 0xc0000.
    • U-Boot commands
sf probe 1
sf erase 0xc0000 0x20000

GPS module (Condor C1919)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Connect a GPS antenna to X10.
  • The GPS module is enabled at boot.
  • If you are using the DEV-Qseven-i.MX development board, set switch S6 to position 0.
Compile minicom
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following package:
[*] minicom
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build minicom now.
Display data
  • Get GPS data (DEV-i.MX53):
minicom -D /dev/ttymxc2 -b 9600  (DEV-i.MX53)
  • Get GPS data (DEV-Qseven-i.MX):

Search for the correct TTY Device:

root@bluetechnix ~$ dmesg|grep -i cp210x
...
usb 2-1.5.3: cp210x converter now attached to ttyUSB4
usb 2-1.5.3: cp210x converter now attached to ttyUSB5

Take the first device (ttyUSB4)!

minicom -D /dev/ttyUSB4 -b 9600  (DEV-Qseven-i.MX)
  • Quit: Press Ctrl+A, then Z, then X, then Enter.

GPS (on Sierra Wireless SL8082 UMTS/GPS module)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.1
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
[*] minicom
[*] usbutils
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build minicom and usbutils now.
Test in Linux
  • Connect a GPS antenna to X5.
  • If you are using the DEV-Qseven-i.MX development board, set switch S5 to position 0.

After the i.MX53 has booted, check if the GPS module was detected with lsusb.

root@sbc-imx51:~# lsusb
[...]
Bus 002 Device 003: ID 1199:68a3 Sierra Wireless, Inc.
[...]

You may also get more information, please use the bus and device numbers from the output above:

root@sbc-imx51:~# lsusb -s2:3 -v

Bus 002 Device 003: ID 1199:68a3 Sierra Wireless, Inc. 
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0 
 bDeviceProtocol         0 
 bMaxPacketSize0        64
 idVendor           0x1199 Sierra Wireless, Inc.
 idProduct          0x68a3 
 bcdDevice            0.06
 iManufacturer           4 Sierra Wireless, Incorporated
 iProduct                3 SL8082

Next, check if the /dev/ttyUSBX character devices were created (typically four). Among these, it is the last device that is detected which is used as the AT commands configuration interface.

root@sbc-imx51:~# dmesg | grep Sierra
USB Serial support registered for Sierra USB modem
sierra: v.1.7.16:USB Driver for Sierra Wireless USB modems
sierra 2-1.6:1.0: Sierra USB modem converter detected
usb 2-1.6: Sierra USB modem converter now attached to ttyUSB0
sierra 2-1.6:1.1: Sierra USB modem converter detected
usb 2-1.6: Sierra USB modem converter now attached to ttyUSB1
sierra 2-1.6:1.2: Sierra USB modem converter detected
usb 2-1.6: Sierra USB modem converter now attached to ttyUSB2
sierra 2-1.6:1.3: Sierra USB modem converter detected
usb 2-1.6: Sierra USB modem converter now attached to ttyUSB3

We use the program minicom to test communication with the GPS/UMTS module.

minicom -D /dev/ttyUSB3 -b 9600

and request some information from the module (input bold):

AT+CGMI
Sierra Wireless, Incorporated

OK
AT+CGMM 
SL8082

OK
AT+CGMR
S2_0_0_3AP R666 CARMD-EN-10526 2011/02/03 10:31:00

OK
GPS Data
  • Start GPS tracking
AT!GPSTRACK=1,255,1000,1000,1
  • Show GPS status
AT!GPSSTATUS?
  • Show GPS location
AT!GPSLOC?

GSM/GPRS module ublox LEON-G100

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
[*] minicom
[*] ppp
[*]   Install support for PPP packet filtering (needs driver support)
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build minicom and ppp now.
Basic test in Linux

We use the program minicom to test communication with the GSM/GPRS module.

minicom -D /dev/ttymxc1 -b 230400 -s  (DEV-i.MX53)
minicom -D /dev/ttyUSB5 -b 230400 -s  (DEV-Qseven-i.MX)
  • Go to Serial port setup.
  • Turn off Hardware Flow Control (Press key F).
  • Press ENTER to leave the menu.
  • Press ESC to leave the main menu.

Now, type garbage into the terminal until you can see what you type. This means that the autobauding function of the module has successfully detected our baud rate.

We can request some information from the module (input bold):

AT+CGMI
u-blox

OK
AT+CGMM
LEON-G100

OK
AT+CGMR
07.30.03

OK
Establish an Internet connection with PPPD

Now that we have checked the communication with the modem, we demonstrate how to establish an Internet connection.

  • First - if you have not done already - shut down your EXT-i.MX53-COMM and insert a SIM card on the bottom side. Connect a GSM antenna to connector X3. Then boot up Linux again.
  • Edit the file
/etc/chatscripts/ppp

The file contains the required configuration such as PIN, APN (access point name), and phone number. You have to customize items marked red:

ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
# modeminit
'' AT+CMEE=2
TIMEOUT 3
OK AT+CPIN?
'READY-AT+CPIN="1234"-' ''
'OK' 'ATZ'
OK AT&K0
TIMEOUT 10
'OK' 'AT+CGDCONT=1,"IP","web.yesss.at"'
'OK' 'ATD*99#'
CONNECT \d\c
# end of pppconfig stuff
  • Edit the file
/etc/ppp/peers/ppp

and set the correct device file (e.g., /dev/ttyUSB1).

Afterwards, try establishing the connection with the following command. Note that if connection fails, it's worth that you retry.

pppd call ppp nodetach

If everything works fine, then you will see a similar output:

root@sbc-imx51:~# pppd call ppp nodetach
abort on (BUSY)
abort on (NO CARRIER)
abort on (VOICE)
abort on (NO DIALTONE)
abort on (NO DIAL TONE)
abort on (NO ANSWER)
abort on (DELAYED)
send (AT+CMEE=2^M)
timeout set to 3 seconds
expect (OK)
AT+CMEE=2^M^M
OK
 -- got it

send (AT+CPIN?^M)
expect (READY)
^M
AT+CPIN?^M^M
+CPIN: READY
 -- got it

send (^M)
expect (OK)
^M
^M
OK
 -- got it

send (ATZ^M)
expect (OK)
^M
^MATZ^M^M
OK
 -- got it

send (AT&K0^M)
timeout set to 10 seconds
expect (OK)
^M
AT&K0^M^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","web.yesss.at"^M)
expect (OK)
^M
AT+CGDCONT=1,"IP","web.yesss.at"^M^M
OK
 -- got it

send (ATD*99#^M)
expect (CONNECT)
^M
ATD*99#^M^M
CONNECT
 -- got it

send (\d)
Serial connection established.
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttymxc1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x71dfe05e> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x71dfe05e> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <mppe -H -M -S -L -D -C> <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 15 12 06 00 00 00 00 1a 04 78 00 18 04 78 00 15]
rcvd [IPCP ConfReq id=0x1 <addr 10.114.147.229>]
sent [IPCP ConfAck id=0x1 <addr 10.114.147.229>]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfNak id=0x2 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
sent [IPCP ConfReq id=0x3 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
rcvd [IPCP ConfAck id=0x3 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
replacing old default route to eth0 [192.168.1.1]
local  IP address 10.114.147.229
remote IP address 10.114.147.229
primary   DNS address 194.24.128.100
secondary DNS address 81.3.216.100
Script /etc/ppp/ip-up started (pid 2701)
Script /etc/ppp/ip-up finished (pid 2701), status = 0x0

To disconnect, hit [ Ctrl+c ].

Debugging

What you may try if you don't get a connection

  • You may test the effects of AT commands directly with
minicom -o

An init sequence could be:

AT+CPIN="1234"
ATZ
AT&K0
ATQ0
  • You may enable verbose error messages instead of the generic ERROR:
AT+CMEE=2
  • Check if your service provider's signal is available with the +COPS command:
AT+COPS=?

You should see your service provider in the list.

  • If anything goes wrong after seeing the CONNECT from the modem, you may have a look at PPPD's configuration file
/etc/ppp/peers/ppp

Help resources

  • The ppp and chat man pages, usually installed on Linux PCs:
man ppp
man chat

GStreamer and Multimedia Codec Libraries Installation

  • Download the i.MX53 hardware codecs package from the Freescale website (open the Codecs and other Algorithms menu).
IMX_MMCODECS_11.05.tar.gz
  • Unpack it and copy the following files to /opt/freescale/pkgs/:
IMX_MMCODECS_11.05/Ltib Files/fsl-mm-codeclib-2.0.1.tar.gz
IMX_MMCODECS_11.05/Ltib Files/gst-fsl-plugin-2.0.1.tar.gz
  • Unpack the file
IMX_MMCODECS_11.05/Ltib Files/ltib_spec_patch_base_on_11.05.01.zip
  • Copy the following from the unpacked files to ltib/dist/lfs-5.1/fsl-mm/:
fsl-mm-aacpdec-codeclib.spec
fsl-mm-flv-codeclib.spec
fsl-mm-ac3dec-codeclib.spec
fsl-mm-mp3enc-codeclib.spec
fsl-mm-codeclib.spec
fsl-mm-ms-codeclib.spec
gst-fsl-plugin.spec*

* Important: If you are using BSP release 1.6 or newer, don't copy the gst-fsl-plugin.spec file.

  • LTIB configuration: In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
Freescale Multimedia Plugins/Codecs  --->
  [*] fsl-mm-codec-libs
  [*] gstreamer-fsl-plugins
[*] gstreamer
[*] gstreamer-plugins-base
[*] gstreamer-plugins-good
[*] gstreamer-plugins-bad

(You may as well enable other gstreamer plugins: ugly, FFmpeg, farsight.)

  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build GStreamer and the Freescale Multimedia Codec libraries now.

Gyroscope (ST-Microelectronics L3G4200D)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
[*] evtest 
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build evtest now.
Test in Linux
  • Load the kernel module
modprobe l3g4200d
  • Enable the device
echo 1 > /sys/devices/platform/imx-i2c.2/i2c-2/2-0068/enable_device
  • Display the input devices
cat /proc/bus/input/devices
  • You may find an input device similar to the following in your devices file.
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="l3g4200d"
P: Phys=
S: Sysfs=/devices/platform/imx-i2c.2/i2c-2/2-0068/input/input1
U: Uniq=
H: Handlers=event0
B: EV=9
B: ABS=7
  • Use the Handlers information (marked red) to start the evtest application, which displays all input events on the terminal.
evtest /dev/input/event0

HDMI Out

{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Enable HDMI via kernel argument

Add the following parameter to bootargs_base in U-Boot:

hdmi
  • Select display interface 1 as the primary one:

Add the following parameter to bootargs_base in U-Boot:

di1_primary
  • Set interface mode, resolution, refresh rate:

Add a similar or one of the following parameters to bootargs_base in U-Boot:

video=mxcdi1fb:RGB24,UXGA
video=mxcdi1fb:RGB24,1280x720M@60
video=mxcdi1fb:RGB24,800x600M@60

("UXGA" is a pre-defined mode in linux/arch/arm/mach-mx5/cmimx53.c and linux/arch/arm/mach-mx5/mx53_qseven.c, UXGA is 1600x1200 at 60 Hz)

  • The maximum resolution is UXGA at 60Hz. The maximum pixel clock for the i.MX53 as well as for the HDMI transmitter is 165MHz.
  • Unblank the screen in Linux:
echo 0 > /sys/class/graphics/fb0/blank
  • Disable automatic screen blanking after 10 minutes:

In U-Boot, add a parameter to bootargs_base:

setenv bootargs_base $(bootargs_base) consoleblank=0
saveenv
reset

LEDs (RGB)

{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • U-Boot lets them flash when it comes up, then stays at green
  • Linux turns them to blue during boot
  • Control them in Linux:
echo [0..255] > /sys/class/leds/rgb-[r,g,b]/brightness
  • Unit test
/unit_tests/bluetechnix/rgbled.sh

Magnetometer (Freescale MAG3110 module)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
[*] evtest 
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build evtest now.
Test in Linux
  • Load the kernel module
modprobe mag3110
  • Enable the sensor
echo 1 > /sys/devices/platform/imx-i2c.2/i2c-2/2-000e/enable
  • Display the input devices
cat /proc/bus/input/devices
  • Search for the following device (mag3110) and note the Handlers line:
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="mag3110"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=event0
B: EV=9
B: ABS=7
  • Start evtest to see the magnetometer's output:
evtest /dev/input/event0

RTC

{{#if: Argos®2D A100 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.1
DEV-Qseven-i.MX   ≥V1.0
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

The Argos®2D A100 board contains an RTC on I2C3 which is by default mapped to /dev/rtc0. Linux will automatically backup and restore the system time from this RTC.

The Linux configuration option for this RTC can be found at

Linux Kernel Configuration
  Device Drivers  --->
    <*> Real Time Clock  --->
      <*>   NXP PCF2129A

For the RTC to work, you have to populate a coin cell (nominal voltage 3V; sizes MC621, V364, SC621) on the base board.

SATA

{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
conga-QEVAL   
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • SATA boot: Before booting from SATA works, you must blow a fuse. You can do that on the U-Boot prompt:
iim blow 4 3 4

Note that VDD_FUSE must be powered for blowing fuses, which is not the default configuration. Contact Bluetechnix for support.

  • In Linux, SATA devices are /dev/sdX devices
  • Note that since SW Rel 1.2, SATA devices are not in hotplug mode anymore (so the clocks need not always be on). If you want to change that, disable the kernel configuration option CONFIG_SATA_AHCI_FSL_NO_HOTPLUG_MODE.
  • Since SW Rel 1.6, the hotplug mode can also be enabled via kernel command line in U-Boot (e.g. if you want to measure the die temperature with the default Linux binary). In U-Boot, do
setenv bootargs_base $(bootargs_base) satahotplug
saveenv
  • Because of the hotplug being disabled, the board won't recognize some SATA harddisks, when powered off and on again (via the power on button), this is because the hard disk takes too much time to respond, so the kernel assumes no disk is present. To fix this, simply add the sata command to the boot command of your choice at the u-boot prompt. For mmc boot do:
setenv bootcmd_mmc sata\; $(bootcmd_mmc)
saveenv

Alternatively you can enable SATA hotplug as explained above, but this deteriorates power savings of the module.

  • Update U-Boot on SATA disk with running U-Boot:
tftpboot u-boot.bin
sata init
sata write $(loadaddr) 0x0 0x200

(Note that numbers are in blocks, i.e. Bytes/512)

  • For setting up a bootable SATA disk, you can use a similar procedure as in the setup_sdcard.sh script
  • Unit test
/unit_tests/bluetechnix/sata.sh

SD card

{{#if: Qseven-i.MX537 ||}}{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
conga-QEVAL   Rev. 1.2
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • Unit test /dev/mmcblk0
/unit_tests/bluetechnix/sd.sh
  • Unit test /dev/mmcblk1
/unit_tests/bluetechnix/sd2.sh
  • Setting up a bootable SD card including U-Boot, Linux, rootfs
./setup_sdcard.sh [device]

(can be found on your host machine in the ltib/ folder)

  • Writing a release image to SD Card using Linux

Unpack:

bunzip2 XXX-sdcard-image-X.Y.bin.bz2

Write:

dd if=XXX-sdcard-image-X.Y.bin of=/dev/sdX bs=1M
  • Writing a release image to SD Card using Windows

See Write an Image to a SDCARD using Windows

Serial terminal over USB

{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
conga-QEVAL   
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

Linux has the capability to emulate a serial connection via a USB-OTG port (that may also function as a USB device). This is especially useful on boards like Argos®2D A100 where the UART1 serial port is only accessible on an extension connector via a breakout-cable.

Instructions:

  • Connect the USB-OTG port to your Linux PC.
  • Load the g_serial kernel module (USB gadget driver)
root@bluetechnix ~$ modprobe g_serial
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
fsl-usb2-udc: bind to driver g_serial 
g_serial gadget: high speed config #2: CDC ACM config
  • Start the getty terminal program on the newly created serial device
root@bluetechnix ~$ /sbin/getty -n -l /bin/sh 115200 /dev/ttyGS0
  • On your Linux PC, you should see a similar output in the kernel log:
harald@linuxmach:~$ dmesg
[  205.116029] usb 1-5: new high speed USB device using ehci_hcd and address 3
[  205.253295] usb 1-5: configuration #2 chosen from 1 choice
[  205.293900] cdc_acm 1-5:2.0: This device cannot do calls on its own. It is not a modem.
[  205.293992] cdc_acm 1-5:2.0: ttyACM0: USB ACM device
[  205.295174] usbcore: registered new interface driver cdc_acm
[  205.295208] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
  • Now, on your Linux PC, use a terminal program to connect to the /dev/ttyACM0 port. For kermit, the config file looks like this:
set line /dev/ttyACM0
set speed 115200
set carrier-watch off
set flow-control none
set prefixing all
set parity none
set stop-bits 1
set modem none
set file type bin
set file name lit
connect
  • Start kermit with
kermit <config file>
  • Finished!


Autostart

On the MX53 module, you may add the lines to /etc/rc.d/rc.local.

echo 'modprobe g_serial' >> /etc/rc.d/rc.local
echo '/sbin/getty -n -l /bin/sh 115200 /dev/ttyGS0' >> /etc/rc.d/rc.local

Splash screen in U-Boot

{{#if: CM-i.MX53 ||}}{{#if: Qseven-i.MX537 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
CM-i.MX53   ≥V1.0
Qseven-i.MX537   ≥V1.0
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

Since release 1.7.0, the Linux BSP supports displaying a splash screen on the HDMI interface or on the Promate LVDS display. Note that splash screen is deactivated by default.


Enable splash screen support

Within your LTIB installation, edit the configuration file for your i.MX53 module,

rpm/BUILD/u-boot-2009.08/include/configs/mx53_qseven.h
  - or -
rpm/BUILD/u-boot-2009.08/include/configs/cmimx53.h

If the file does not exist yet, you probably have not unpacked the U-Boot source yet. Do this from LTIB's root directory with the following command:

./ltib -m prep -p u-boot

Now, in the configuration file, uncomment either

//#define CONFIG_SPLASH_SCREEN_HDMI
  -or-
//#define CONFIG_SPLASH_SCREEN_LVDS

and re-compile U-Boot

./build_uboot.sh


Create the bitmap

You have to create a Windows BMP image, 16 bits, R5 G6 B5 format. Size is 1280 (width) x 720 (height) pixels (for HDMI) and 800x600 (for LVDS). You may download a working bitmap for HDMI or LVDS for testing.


Display bitmap on screen

Download the image via TFTP for example:

tftp $(loadaddr) BLT_1280x720.bmp
tftp $(loadaddr) BLT_800x600.bmp

Draw it on the screen:

bmp display $(loadaddr)


Store bitmap permanently

We suggest to store the bitmap in NAND flash or on SD card. U-Boot may also extract the file from FAT or EXT2 file systems, if you add one of the following to the configuration file

#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT


For developers

If you want to support another screen, another resolution, etc., you have to

  • Add a new video mode
rpm/BUILD/u-boot-2009.08/board/bluetechnix/cmimx53/cmimx53.c (around line 100)
  • Probably adapt the PLL3 frequency, for the pixel clock being accurate
rpm/BUILD/u-boot-2009.08/board/bluetechnix/cmimx53/lowlevel_init.S (around line 142, words at bottom of file)
rpm/BUILD/u-boot-2009.08/include/asm/arch/mx53.h (add DP_* defines here)
  • Adapt lcd_enable() -- DI clock divider, GPIO configuration, PWM configuration, etc.
rpm/BUILD/u-boot-2009.08/board/bluetechnix/cmimx53/cmimx53.c (around line 920)

Temperature sensor

{{#if: Qseven-i.MX537 ||}}{{#if: CM-i.MX53-C-I-Q24S1024F4N2048 ||}}{{#if: CM-i.MX53-C-C-Q24S1024F4N2048 ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Qseven-i.MX537   ≥V1.0
CM-i.MX53-C-I-Q24S1024F4N2048   ≥V1.0
CM-i.MX53-C-C-Q24S1024F4N2048   ≥V1.0
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

The i.MX53 has an on-chip temperature sensor within the SATA block. To enable it permanently, you have to switch on hotplug mode, i.e. disable the power-save mode:

Linux Kernel Configuration
  Device Drivers  --->
    <*> Serial ATA and Parallel ATA drivers  --->
      [ ]     Freescale i.MX SATA AHCI NO HOTPLUG mode

Alternatively, you may enable the SATA block with the satahotplug kernel parameter. See #SATA.

After booting this kernel, even if no SATA device is connected, the on-die temperature can be read out this way:

root@bluetechnix ~$ cat /sys/devices/platform/ahci.0/temperature
SATA AHCI current temperature:31

(The temperature is °C.)

You may want to read Freescale's application note AN4380 about the SATA temperature sensor: https://cache.freescale.com/files/32bit/doc/app_note/AN4380.pdf?fpsp=1

Touch panel (Capacitive) EETI eGalax

{{#if: All ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
All   
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}

Bluetechnix has successfully tested an EETI eGalax touch panel, connected via USB (ID: 0eef:7321). Contact Bluetechnix for more information!

We have modified the following HID (Human Interface Device) device driver:

drivers/hid/hid-egalax.c

The device driver is enabled in the imx5_defconfig kernel configuration.

Supported since Linux software release 1.2.

Touch panel (Capacitive) FocalTech FT5x06

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
Qt (Qt Embedded)  --->
 [*] Phonon   
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build Qt Embedded now.
Test in Linux
  • Edit the file “ltib/rootfs/etc/profile”, and add the followed lines:
export GST_PLUGIN_PATH=/usr/lib/fsl_mm_linux/lib/gstreamer-0.10
export QTDIR=/qt
export QPEDIR=/qt
export PATH=$QTDIR/bin:$PATH
export TSLIB_ROOT=/usr
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_TSEVENTTYPE=INPUT
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFb:/dev/fb0
export QWS_SIZE=320x240
export set QT_QWS_FONTDIR=$QTDIR/lib/fonts/
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH
  • Load the kernel module
modprobe ft5x06-ts
  • Calibrate the touch panel
ts_calibrate
  • Test the touch panel
ts_test
  • Test the touch panel with Qt embedded
cd /qt/demos/pathstroke/
./pathstroke -qws

Touch panel (Resistive) AD7843

{{#if: DEV-Qseven-i.MX ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-Qseven-i.MX   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following package:
[*] tslib 
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build now.
Configuration in Linux
modprobe ad7843-mxc
export TSLIB_FBDEVICE=/dev/fb1
export TSLIB_TSDEVICE=/dev/input/event0

(use event1 for second touch interface)

export TSLIB_CONFFILE=/usr/etc/ts.conf
Calibrate display
ts_calibrate
Test display
ts_test

UMTS (on Sierra Wireless SL8082 module)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}


NOTE: For LTIB configuration and basic connection test in Linux, see the following chapter: #GPS (on Sierra Wireless SL8082 UMTS/GPS module).


Establish a connection with PPPD

We assume you have checked that basic communication with the modem works. Now we will demonstrate how to establish a connection.

  • First - if you have not done already - shut down your EXT-i.MX53-COMM and insert a SIM card on the bottom side. Connect a UMTS antenna to connector X4. Then boot up Linux again.
  • Edit the file
/etc/chatscripts/ppp

The file contains the required configuration such as PIN, APN (access point name), and phone number. You have to customize items marked red:

ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
# modeminit
'' AT+CMEE=2
TIMEOUT 3
OK AT+CPIN?
'READY-AT+CPIN="1234"-' ''
'OK' 'ATZ'
OK AT&K0
TIMEOUT 10
'OK' 'AT+CGDCONT=1,"IP","web.yesss.at"'
'OK' 'ATD*99#'
CONNECT \d\c
# end of pppconfig stuff
  • Edit the file
/etc/ppp/peers/ppp

and set the correct device file (e.g., /dev/ttyUSB3).

Afterwards, try establishing the connection with the following command. Note that if connection fails, it's worth that you retry.

pppd call ppp nodetach

If everything works fine, then you will see a similar output:

root@sbc-imx51:~# pppd call ppp nodetach
abort on (BUSY)
abort on (NO CARRIER)
abort on (VOICE)
abort on (NO DIALTONE)
abort on (NO DIAL TONE)
abort on (NO ANSWER)
abort on (DELAYED)
send (AT+CMEE=2^M)
timeout set to 3 seconds
expect (OK)
AT+CMEE=2^M^M
OK
 -- got it

send (AT+CPIN?^M)
expect (READY)
^M
AT+CPIN?^M^M
+CPIN: READY
 -- got it

send (^M)
expect (OK)
^M
^M
OK
 -- got it

send (ATZ^M)
expect (OK)
^M
^MATZ^M^M
OK
 -- got it

send (AT&K0^M)
timeout set to 10 seconds
expect (OK)
^M
AT&K0^M^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","web.yesss.at"^M)
expect (OK)
^M
AT+CGDCONT=1,"IP","web.yesss.at"^M^M
OK
 -- got it

send (ATD*99#^M)
expect (CONNECT)
^M
ATD*99#^M^M
CONNECT
 -- got it

send (\d)
Serial connection established.
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttymxc1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x71dfe05e> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x71dfe05e> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x78d8680c> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <mppe -H -M -S -L -D -C> <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 15 12 06 00 00 00 00 1a 04 78 00 18 04 78 00 15]
rcvd [IPCP ConfReq id=0x1 <addr 10.114.147.229>]
sent [IPCP ConfAck id=0x1 <addr 10.114.147.229>]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfNak id=0x2 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
sent [IPCP ConfReq id=0x3 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
rcvd [IPCP ConfAck id=0x3 <addr 10.114.147.229> <ms-dns1 194.24.128.100> <ms-dns3 81.3.216.100>]
replacing old default route to eth0 [192.168.1.1]
local  IP address 10.114.147.229
remote IP address 10.114.147.229
primary   DNS address 194.24.128.100
secondary DNS address 81.3.216.100
Script /etc/ppp/ip-up started (pid 2701)
Script /etc/ppp/ip-up finished (pid 2701), status = 0x0

To disconnect, hit [ Ctrl+c ].


Debugging

What you may try if you don't get a connection

  • You may test the effects of AT commands directly with
minicom -o

An init sequence could be:

AT+CPIN="1234"
ATZ
AT&K0
ATQ0
  • You may enable verbose error messages instead of the generic ERROR:
AT+CMEE=2
  • Check if your service provider's signal is available with the +COPS command:
AT+COPS=?

You should see your service provider in the list.

  • If anything goes wrong after seeing the CONNECT from the modem, you may have a look at PPPD's configuration file
/etc/ppp/peers/ppp


Send an SMS
  • An SMS can be written with the AT commands:
AT+CMGF=1
AT+CMGS=<receiver's phone number><CR><message><CTRL-Z>

USB OTG

{{#if: Argos®2D A100 ||}}{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
Argos®2D A100   ≥V1.0
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
conga-QEVAL   
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • The Linux driver for USB Host is automatically loaded (part of the kernel).
  • If you want to test the port in device mode, then you have to load a gadget kernel module. For available gadgets, look into
/lib/modules/2.6.35.3.../kernel/drivers/usb/gadget/
  • Note: Do not use the USB Host mode (e.g. connect a USB flash disk) while a gadget module is loaded. (We observed that the driver crashes.)
  • Unit test (for DEV-i.MX53; assumes that a USB disk is plugged into the USB-OTG port, and another one is plugged into one of the 4 USB-HOST ports)
/unit_tests/bluetechnix/usb.sh
  • Unit test (for Argos®2D A100; assumes that a USB disk is plugged into the USB-OTG port)
/unit/tests/bluetechnix/usb-icam.sh

USB Host/Hub

{{#if: DEV-i.MX53 ||}}{{#if: DEV-Qseven-i.MX ||}}{{#if: conga-QEVAL ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
DEV-i.MX53   ≥V1.0
DEV-Qseven-i.MX   ≥V1.0
conga-QEVAL   
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
  • The Linux driver for USB Host is automatically loaded (part of the kernel).
  • USB Host1 is usually connected to a 7-port USB hub.
  • Unit test (assumes that a USB disk is plugged into the USB-OTG port, and another one is plugged into one USB-HOST port)
/unit_tests/bluetechnix/usb.sh
  • Unit test (tests all USB disks on pure USB-HOST ports)
/unit_tests/bluetechnix/usb-hosts.sh

Wireless LAN (Lesswire WiBear-SF module)

{{#if: EXT-i.MX53-COMM ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}{{#if: ||}}
EXT-i.MX53-COMM   ≥V1.0
{{{3}}}   {{{4}}}
{{{5}}}   {{{6}}}
{{{7}}}   {{{8}}}
{{{9}}}   {{{10}}}
{{{11}}}   {{{12}}}
{{{13}}}   {{{14}}}
{{{15}}}   {{{16}}}
{{{17}}}   {{{18}}}
{{{19}}}   {{{20}}}
LTIB configuration
  • In ltib/ folder, start LTIB's configuration dialog:
./ltib -c
  • Go to
Package list  --->
  • Select the following packages:
[*] firmware-wibear
[*] wireless-tools
[*] wpa_supplicant
  • Exit from LTIB and save your new configuration (you will be asked).
  • LTIB will build wireless-tools now.
Test in Linux

SDIO card should be showed after booting.

 mmc1: new SDIO card at address 0001

To make the module work load the libertas_sdio module

$ modprobe libertas_sdio

Check if your device is detected

$ iwconfig
[...]
wlan0    IEEE 802.11b/g  ESSID:""  
         Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   
         Bit Rate:0 kb/s   Tx-Power=18 dBm   
         Retry short limit:8   RTS thr=2347 B   Fragment thr=2346 B   
         Encryption key:off
         Power Management:off
         Link Quality:0  Signal level:0  Noise level:0
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Next, you will activate the interface

$ ifconfig wlan0 up

Scan for an access point

$ iwlist wlan0 scan
[...]
wlan0    Scan completed :
         Cell 01 - Address: 0A:09:0F:48:C1:B0
                   ESSID:"MyWLAN"
                   Mode:Managed
                   Frequency:2.412 GHz (Channel 1)
                   Quality=38/100  Signal level=-90 dBm  Noise level=-96 dBm
                   Encryption key:off
                   Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                             9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                             48 Mb/s; 54 Mb/s
[...] 

Associate to your access point

$ iwconfig wlan0 essid MyWLAN

and get an IP adreess

$ udhcpc -i wlan0
udhcpc (v1.15.0) started
Sending discover...
Sending discover...
Sending select for 192.168.1.171...
Lease of 192.168.1.171 obtained, lease time 43200
Deleting routers
adding dns 192.168.1.1

Last, you can test the network interface.

$ ping -c 1 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.295 ms

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.295/0.295/0.295 ms 
WPA2 encryption example using wpa_supplicant
  • NOTE: Linux BSP v1.8.0 or later is required. Earlier versions include an outdated version of wpa_supplicant which does not correctly support WPA2 encryption.
  • Start LTIB configuration.
./ltib -c
  • Include the following package to be built.
Package list  --->
  [*] wpa_supplicant
  • Exit from LTIB and save your new configuration. Let LTIB run.


  • On the i.MX53, get some information about ciphers supported by your Wi-Fi (marked blue).
$  iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: xxxxxx
                    ESSID:"your_ssid_here"
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=41/100  Signal level=-89 dBm  Noise level=-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                      Preauthentication Supported
  • In the MX53's root file system, create the following configuration file. For the ciphers (again marked blue), choose TKIP or CCMP, depending on your iwlist output.
#/etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
network={
	ssid="your_ssid_here"
	scan_ssid=1
	proto=WPA RSN
	key_mgmt=WPA-PSK
	pairwise=CCMP
	group=CCMP
	psk="your_passphrase_here"
}
  • Boot the i.MX53 and execute all of the steps above, until
$ ifconfig wlan0 up
  • Start wpa_supplicant
$ /usr/local/sbin/wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
  • You can control the connection status. Look for the encryption key (it must not be off) and a valid access point.
$ iwconfig
[...]
wlan0     IEEE 802.11b/g  ESSID:"your_ssid_here"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 0A:C9:0E:48:C1:40
          Bit Rate:11 Mb/s   Tx-Power=15 dBm
          Retry short limit:8   RTS thr=2347 B   Fragment thr=2346 B
          Encryption key:<too big>   Security mode:open
          Power Management:off
          Link Quality=6/100  Signal level=-87 dBm  Noise level=-89 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
  • Next, you can start a DHCP client or manually configure the network interface.