iMX6 Rex Development Baseboard production test

Before you start testing baseboard peripherals, go through the module tests first >>

Content


GPIOs

Fit links to connect these pins: J34.2 with J34.4; J34.3 with J34.5. The test will change the value of GPIO pins J34.2&3 and reads back the level from pins J34.4&5. This test can also read the status of user button (SW3).

# cd ~/i2c-gpio-test/
# ./i2c-gpio-test

+++START+++
CTRL+C to exit
User button is released.
User button is pressed.
User button is released.
^C
+++DONE+++
CYCLES PASS: 15081 FAILED: 0
Total: 30162 bytes. Test time: 19 s 706260 us.
Measured: total 1530.58 Bps.

Leave the test running for couple of seconds (e.g. 10 seconds). Try also the User button. Cancel the test press CTRL+C. By the end of the test, be sure “FAILED” = 0.

Touch screen controller

At this stage, we only check if the touchscreen is recognized on the I2C bus.

# i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: UU 51 -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Check, if you can see the number “48″ – this is the address where the touchscreen is located.

Modem + Modem Audio

Turn off the board. Insert the Telit HE910 PCIe mini card into the connector J9 (located on the bottom side, see the description on the silkscreen layer). Connect an antenna to the center RF connector. Plug in a SIM card into the holder on the top side (J7). Connect your speakers to the headers J10 and J12 and a microphone to the J11. After that, power up the board, cancel the autoboot process in the u-Boot and COPY & PASTE these commands:

> setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 1; ext2load mmc 1 0x10800000 uImage-wifi-and-modem-no-fec 4095972; bootm 0x10800000'
> setenv bootcmd 'run bootcmd_mmc'
> saveenv
> reset

Connect to the modem through picocom:

picocom /dev/ttyACM3 -b 115200

Test if the modem is connected to a network. Insert the commands staring with “AT”:

AT
OK
AT+COPS?
+COPS: 0,0,"O2 - SK ",2

OK

After you insert AT+COPS? (and press enter), you should see information about your network provider. To exit the picocom press Ctrl+A and then Ctrl+X.

Now, we need to configure the modem audio. This is done through banch of I2C commands. We will prepare a script, with the commands. Create a new file:

# nano audio_i2c_config.sh

COPY & PASTE the following lines into the new “audio_i2c_config.sh” file (after you place the text to the file press Ctrl+X and press enter to save and exit):

#! /bin/bash

i2cset 1 0x18 0x04 0x00
i2cset 1 0x18 0x05 0x10
i2cset 1 0x18 0x06 0x90
i2cset 1 0x18 0x07 0x00
i2cset 1 0x18 0x08 0x10
i2cset 1 0x18 0x09 0x0a
i2cset 1 0x18 0x0a 0x33
i2cset 1 0x18 0x0b 0x00
i2cset 1 0x18 0x0c 0x00
i2cset 1 0x18 0x0d 0x33
i2cset 1 0x18 0x0e 0x0c
i2cset 1 0x18 0x0f 0x0c
i2cset 1 0x18 0x10 0x09
i2cset 1 0x18 0x11 0x09
i2cset 1 0x18 0x12 0x24
i2cset 1 0x18 0x13 0x24
i2cset 1 0x18 0x14 0x40
i2cset 1 0x18 0x15 0x00
i2cset 1 0x18 0x16 0x60
i2cset 1 0x18 0x17 0x8a

Change the file permission and run the script (keep pressing ENTER until it finishes):

# chmod 777 audio_i2c_config.sh
# ./audio_i2c_config.sh

Go back to the picocom:

picocom /dev/ttyACM3 -b 115200

an run these AT commands:

AT#DVI=1,2,1
OK
AT#DVIEXT=1,0,0,1,0
OK

Now, the iMX6 Rex is ready to receive a call. Call your modem (use the SIM card number which is inserted in the Baseboard). You should see the RING message in the picocom and hear a ring sound from the speakers. Use “ATA” command to receive the call:

RING

RING

ATA
OK

Speak through the phone and the baseboard microphone to test the transmission.

Touchscreen

Connect the LVDS display with touchscreen support to the LVDS Adapter Type 1. Use the display which is compatible with this adapter. Connect the adapter with LVDS connector (J41) and touchscreen connector (J40) on the iMX6 Rex Dev Baseboard. Fit a link to the header J17 between pins 2-3. Be aware! If you connect the link wrong way you may damage your LVDS display! (Note: the link selects LVDS power voltage between 3.3V or 5V).

Setup the u-boot command to use LVDS display as a default:

> setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait video=mxcfb0:dev=ldb,640x480M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M'
> saveenv; reset

Boot up the board with the kernel which supports touchscreen and lower resolution LVDS displays (located here). Boot up the board and run the X-window:

# export DISPLAY=:0.0
# startx &

Now test if touchscreen is working correctly. If the cursor is moving in opposite to the direction or the click is misplaced calculate the touchscreen (follow these steps).

Important!

Before you send the tested board to a customer, update the u-boot environmental variables (run these commands):

> setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M''
> setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 1; ext2load mmc 1 0x10800000 uImage 3850796; bootm 0x10800000'
> setenv bootcmd 'ping 192.168.1.1; run bootcmd_mmc'
> saveenv; reset