Here you can find the setup, scripts and results of EMC testing.
Connected cables/devices
Power jack: +12V from an isolated source
SD card 1 (the one on the PCB edge): preloaded with Filesystem and used for booting
SD card 2 (the one under heatsink): used for read/write testin
RTC Battery: inserted in the holder
Ethernet: Ethernet loopback cable connected. Forced to 100Mb and used for ping test.
HDMI monitor: during the test, the monitor is connected but turned off.
2x USB memory stick: each connected through an extension cable. Both used during read/write test.
RS232: a null modem cable connected. During the test, the cable was terminated with an RS232 to USB converter.
SATA CFAST card (without the metal card holder): used for read/write testing
Headphones & Microphone: standard headphones connected to the headphones and microphone jack
Audio loopback: a cable connected between Line in and Line out
Wifi PCIE mini card: inserted, but not actively used. No antennas connected.
Modem: inserted, but not actively used. No antennas connected, no SIM card inserted.
The goal of this test was to check Radiated and Conducted emission of iMX6 Rex board while running at very high load. What was running:
CPU stress test
Memory stress test
GPU stress test (running a Full HD graphics test at rate 150 frames per second)
Linux GUI
Playing a video file
Playing an audio file
SD card test (SD card read & write stress test)
2x USB test (USB memory stick read & write stress test)
SATA test (CFAST SSD card read & write stress test)
Ethernet ping
*Note: Tested for EN55022B
1. Download this file system (created based on Jasbirs blog), download this kernel and follow these steps to prepare SD card.
2. Insert the SD card to the edge SD card slot.
3. Update the u-boot to boot up from SD card and set few other parameters:
> setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=192.168.10.91:::255.255.255.0 root=/dev/mmcblk1p1 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M'
> setenv bootcmd_mmc 'run bootargs_mmc ; mmc dev 1; ext2load mmc 1 0x10800000 imx6rex-uImage-gpu-en-audio-fix-03-APR-2014 3915972; bootm 0x10800000'
> saveenv
4. Run test scripts (they are included in the file system, or you can download them here: Download Standard Test or Download Heavy Test). As script parameters use the directories where the devices are mapped (without /dev/) "./name-of-the-test.sh SATA_DIR USB0_DIR USB1_DIR MMC0_DIR" Here are examples how to run the scripts (in this example /dev/mmcblk1p1 is a filesystem device):
# ./emc-test1.sh sda1 sdb1 sdc1 mmcblk0p1
and the heavy test
# ./emc-test-all.sh sda1 sdb1 sdc1 mmcblk0p1
*Note: you may need to check where your devices are mounted. Use "fdisk -l". Here is an example:
# fdisk -l
Disk /dev/sda: 7998 MB, 7998455808 bytes
108 heads, 63 sectors/track, 2296 cylinders, total 15621984 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x001c2022
Device Boot Start End Blocks Id System
/dev/sda1 2048 15621983 7809968 83 Linux
Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes
4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc44e7f69
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 7626751 3812352 83 Linux
Disk /dev/mmcblk1: 1977 MB, 1977614336 bytes
61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mmcblk1p1 62 3861421 1930680 83 Linux
Disk /dev/sdb: 16.2 GB, 16219373568 bytes
256 heads, 48 sectors/track, 2578 cylinders, total 31678464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdb1 48 7372799 3686376 6 FAT16
Disk /dev/sdc: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 32 31266815 15633392 c W95 FAT32 (LBA)
#!/bin/sh
mountDevice() {
mount /dev/$1 /media/$2
cat /etc/mtab | grep -F "/dev/$1 /media/$2"
if [ "$?" -eq "0" ]; then
echo "$2 mounted"
else
echo "$2 not mounted"; exit 2
fi
}
# mount devices a test a status
mountDevice $1 sata
mountDevice $2 usb0
mountDevice $3 usb1
mountDevice $4 mmc0
# tell the X applications where they should run
export DISPLAY=:0
# run X window - wait for the procces
service lightdm start
# connect ethernet loopback and force the ethernet to 100Mbit
mii-tool -F 100baseTx-HD
# play a video file in an infinite loop
echo 0 > /sys/class/graphics/fb2/blank
sudo -u "ubuntu" xfce4-terminal --geometry=70x20+100+10 -x mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 /home/ubuntu/Clou$
# ping
sudo -u "ubuntu" xfce4-terminal --geometry=70x25+100+600 -x ping 192.168.10.1 &
# top
sudo -u "ubuntu" xfce4-terminal --geometry=90x50+900+10 -x top &
proceed=1
file1="blackbird.wav"
while [ $proceed -eq 1 ]
do
cp1_done=`ps cax | grep $cp1_pid | grep cp`
if [ -z "$cp1_done" ]; then # run cp only if previous cp is done
cp /media/usb0/$file1 /media/sata &
cp1_pid=$!
echo "started cp from usb0 to sata"
fi
cp2_done=`ps cax | grep $cp2_pid | grep cp`
if [ -z "$cp2_done" ]; then # run cp only if previous cp is done
cp /media/usb1/$file1 /media/mmc0 &
cp2_pid=$!
echo "started cp from usb1 to mmc0"
fi
aud_done=`ps cax | grep $aud_pid | grep aplay`
if [ -z "$aud_done" ]; then
aplay -D hw:0,0 /home/ubuntu/blackbird.wav &
aud_pid=$!
echo "started play audio"
fi
done
# kill all procceses if Ctrl+C detected
trap '$precced=0; kill $cp1_pid $cp2_pid &aud_pid;' 2
sleep 10000
#!/bin/sh
mountDevice() {
mount /dev/$1 /media/$2
cat /etc/mtab | grep -F "/dev/$1 /media/$2"
if [ "$?" -eq "0" ]; then
echo "$2 mounted"
else
echo "$2 not mounted"; exit 2
fi
}
# mount devices a test a status
mountDevice $1 sata
mountDevice $2 usb0
mountDevice $3 usb1
mountDevice $4 mmc0
# tell the X applications where they should run
export DISPLAY=:0
# run X windows - wait for the procces
service lightdm start
# connect Ethernet loopback and force the ethernet to 100Mbit
mii-tool -F 100baseTx-HD
# gpu test
cd /root/gpu-viv-bin-mx6q-3.10.9-1.0.0-hfp/opt/viv_samples/vdk
./tutorial7 &
gpu_pid=$!
cd
# play a video file on the lvds display
echo 0 > /sys/class/graphics/fb2/blank
mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &
vid_pid=$!
# stressapptest - testing sata, 2x usb, sd card, 1 thread CPU, 1 thread memory
stressapptest -f /media/sata/tmp-file1 -f /media/usb0/tmp-file1 -f /media/usb1/tmp-file1 -f /media/mmc0/tmp-file1 -s 600000 -M 50 -m 1 $
str_pid=$!
echo "Stressapptest: " $str_pid
# play a audio file
mplayer -loop 0 -really-quiet /home/ubuntu/blackbird.wav &
aud_pid=$!
# ping
ping 192.168.10.1 &
ping_pid=$!
# top
top
top_pid=$!
# kill all procceses if Ctrl+C detected
trap '$procced=0; kill $gpu_pid $vid_pid $aud_pid $str_pid $ping_pid;' 2
sleep 10000
Note: If the LVDS monitor is not included in the setup comment out these lines:
#echo 0 > /sys/class/graphics/fb2/blank
#mplayer -vo fbdev2:/dev/fb2 -vf scale -zoom -loop 0 -xy 1024 -really-quiet /home/ubuntu/Clouds.avi &
And add this line (to disable LVDS):
# echo 1 > /sys/class/graphics/fb2/blank