iMX6 TinyRex EMC testing

From Voipac Wiki
Jump to navigation Jump to search

Electromagnetic compatibility results for iMX6 TinyRex Development Kit are shown on this page. Test setup and scripts are described in details.

These measurements were performed with boards using the actual hardware and software configuration of the web shop development kits.

Connected cables/devices

  • Power jack: +5V power supply was used for input voltage
  • SD card (Sandisk): preloaded with filesystem, used for booting and for read/write test
  • Ethernet: 1 meter CAT Ethernet loopback cable connected. Forced to 100Mb and used for ping test
  • one of these two HDMI options was used:
    • HDMI loopback: when HDMI input is tested using a loopback connection, HDMI input is connected to its HDMI output via a shielded 1 meter long HDMI micro to HDMI cable
    • HDMI input source and monitor used: a video source (from a different iMX6 TinyRex Development Kit) is plugged into HDMI input using HDMI Micro cable. HDMI Output signal is connected to monitor through 1.8m HDMI cable, monitor is plugged into mains but not turned on. Both monitor and the second iMX6 TinyRex board laid flat on the floor to minimise its affect on results
  • 2x USB flash drive: each connected through a 2m extension cable. Both used during read/write test
  • SATA hard drive: used for read/write testing. The hard drive was placed alongside the tested board. SATA disk was not part of all the test configurations (as per results below)
  • Wifi PCIE mini card: inserted, but not actively used. No antennas connected
  • Debug cable: FTDI TTL-3V3 UART to USB cable, used only to setup the board, not used and not plugged in during the measurements


iMX6 TinyRex Development Kit-EMC-Testing overview.jpg

Test description

The main purpose of testing was to measure Radiated emission of iMX6 TinyRex Development Kit performing under heavy load. Following threads were running during the measurements:

  • CPU stress test
  • Memory stress test
  • HDMI input (receiving a 720p 3Mbps video stream)
  • HDMI output (received HDMI stream is forwarded to HDMI output)
  • SD card test (read & write)
  • 2x USB test (USB memory drive read & write stress test)
  • SATA stress test (read & write) (if applicable)
  • Ethernet ping (and Ethernet SSH session)

Results

All the results were measured in compliance with the emission limits for FCC Class B (EMC standard EN 55022B). Class B devices are suitable for both residential and industrial applications as the norm standards use more restrictive limits.

Graph description

Lower band 30MHz - 1GHz

Radiated emission is measured and displayed as quasi-peak values. This relation is represented as a blue curve in the measurements. Class B limits are shown by red highlighted line 22F3M_B.

Higher band 1GHz - 4GHz

Two plots displaying the power density are used to show results in higher bands. Similar to lower frequencies a blue curve represents quasi-peak values. Class B limits applied for quasi-peak measurements is plotted as the higher placed red line 22F_P_B.
Black curve depicts average-power values. Threshold for average-power measurement is shown with the lower placed limit line called 22F_AV_B.

iMX6 TinyRex Development Kit Max with enclosure – PASS

Test description:

  • stressapptest for CPU and memory
  • Ethernet loopback
  • running heavy testing script for USB and SD card read/write test
  • HDMI input and output both tested with 720p video stream
  • Ethernet SSH session

This setup used HDMI option with separate video input source and monitor. Both the board and the monitor were placed on the floor to minimise its effects. The power source was hidden inside the chamber tunnel under the testing table.

iMX6 TinyRex Development Kit-EMC-HDMI with source and monitor.jpg

Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Max-EMC-RE 30MHz-1GHz Ver Pol.png



iMX6 TinyRex Development Kit Max-EMC-RE 30MHz-1GHz Hor Pol.png

iMX6 TinyRex Development Kit Max: 30MHz - 1GHz


Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Max-EMC-RE 1GHz-4GHz Ver Pol.png



iMX6 TinyRex Development Kit Max-EMC-RE 1GHz-4GHz Hor Pol.png

iMX6 TinyRex Development Kit Max: 1GHz - 4GHz

iMX6 TinyRex Development Kit Max bare board with SATA hard drive – PASS

Test description:

  • stressapptest for CPU and memory
  • SATA stress testing
  • Ethernet loopback
  • running heavy testing script for USB and SD card read/write test
  • HDMI input and output both tested with 720p video stream
  • Ethernet SSH session

This test also included SATA interface by stress testing connected SATA hard drive. During this test HDMI loopback option was used.

These results show that a heavy loaded iMX6 TinyRex Development Kit complies with stricter regulation even if no enclosure is used.

iMX6 TinyRex Development Kit-EMC-Testing bare board with SATA.jpg

Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Max with SATA-EMC-RE 30MHz-1GHz Ver Pol.png



iMX6 TinyRex Development Kit Max with SATA-EMC-RE 30MHz-1GHz Hor Pol.png

iMX6 TinyRex Development Kit Max with SATA: 30MHz - 1GHz


Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Max with SATA-EMC-RE 1GHz-4GHz Ver Pol.png



iMX6 TinyRex Development Kit Max with SATA-EMC-RE 1GHz-4GHz Hor Pol.png

iMX6 TinyRex Development Kit Max with SATA: 1GHz - 4GHz

iMX6 TinyRex Development Kit Pro with enclosure – PASS

Test description:

  • stressapptest for CPU and memory
  • Ethernet loopback
  • running heavy testing script for USB and SD card read/write test
  • HDMI input and output both tested with 720p video stream (loopback option)
  • Ethernet SSH session


iMX6 TinyRex Development Kit-EMC-HDMI loopback.jpg

Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Pro-EMC-RE 30MHz-1GHz Ver Pol.png



iMX6 TinyRex Development Kit Pro-EMC-RE 30MHz-1GHz Hor Pol.png

iMX6 TinyRex Development Kit Pro: 30MHz - 1GHz


Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Pro-EMC-RE 1GHz-4GHz Ver Pol.png



iMX6 TinyRex Development Kit Pro-EMC-RE 1GHz-4GHz Hor Pol.png

iMX6 TinyRex Development Kit Pro: 1GHz - 4GHz

iMX6 TinyRex Development Kit Basic with enclosure – PASS

Test description:

  • stressapptest for CPU and memory
  • Ethernet loopback
  • running heavy testing script for USB and SD card read/write test
  • HDMI input and output both tested with 720p video stream (loopback option)
  • Ethernet SSH session


Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Basic-EMC-RE 30MHz-1GHz Ver Pol.png



iMX6 TinyRex Development Kit Basic-EMC-RE 30MHz-1GHz Hor Pol.png

iMX6 TinyRex Development Kit Basic: 30MHz - 1GHz


Vertical polarisation
Horizontal polarisation

iMX6 TinyRex Development Kit Basic-EMC-RE 1GHz-4GHz Ver Pol.png



iMX6 TinyRex Development Kit Basic-EMC-RE 1GHz-4GHz Hor Pol.png

iMX6 TinyRex Development Kit Basic: 1GHz - 4GHz

Preparing the test

Boot device and software

SD card was selected as a booting device for all the boards. U-Boot settings were not adjusted as the default configuration was used. The only change compared to standard software package was running a multimedia filesystem. To prepare a fresh SD card follow these instructions. Here is an example of creating a SD card suitable for Max configuration:

git clone https://github.com/voipac/imx6tinyrex_bin_linux
cd imx6tinyrex_bin_linux/
sudo ./fsl-sdcard-partition.sh -max /dev/mmcblk0

Downloading stress test

Stressapptest package was selected to create a high CPU and memory load. Placing this file into the same directory where the testing script will be stored is important:

wget http://downloads.voipac.com/files/iMX6_TinyRex_Development_Kit/module/documents/EMC_radiated_emission/stressapptest

Starting DHCP server

The boards were mainly operated through SSH sessions. Thus it is very useful to have the same IP address during the whole process. The easiest way to do so is to run DHCP server on the controlling computer. To allow boards using the same address enable persistent leases with a long duration (2880 min used below):
iMX6 TinyRex Development Kit-Env chamber-DHCP settings.png

Preserving SSH session

To minimise the possibility of results being affected, the control computer was disconnected and taken outside of the test chamber (after the board was setup).

When Ethernet cable connected to a board is disconnected, Linux terminates all the processes started within SSH sessions by default. Screen command allows to keep these sessions running. This command allow tasks to continue even if the cable is unplugged (and Ethernet loopback is plugged right away). It is important to make sure the filesystem includes this command:

sudo apt-get install screen

Running the script

Plug the board into mains and connect to it via SSH session. Screen environment is opened:

screen -S tinyrex

Testing scripts command consists of following arguments

  • the first parameter - version of tested board (-max, -pro or -basic)
  • the second parameter - selects if and how SATA interface will be tested (no SATA testing:-n, only copy test: -sata_cp, stresstest: -sata_stress)
  • the third parameter - USB drive 1 location
  • the fourth parameter - USB drive 2 location
  • the fifth parameter - SD card location
  • the sixth parameter (if connected) - SATA drive location


Several commands which were used during EMC testing are shown below:

  • iMX6 TinyRex Development Kit Max with SATA stresstesting:
./imx6-tinyrex-emc-test.sh -max -sata_stress sdb1 sdc1 mmcblk2p2 sda2 | tee -i trx-emc-testing.log
  • iMX6 TinyRex Development Kit Pro with SATA copying file from/to USB drive:
./imx6-tinyrex-emc-test.sh -pro -sata_cp sdb1 sdc1 mmcblk2p2 sda2 | tee -i trx-emc-testing.log
  • iMX6 TinyRex Development Kit Basic:
./imx6-tinyrex-emc-test.sh -basic -n sda1 sdb1 mmcblk2p2 | tee -i trx-emc-testing.log

The complete script can be found in the download section or down below:

#!/bin/sh
 
# TinyRex EMC testing script
 
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
}
# prepare files
cd ~
mkdir -p emc-testing/
cd emc-testing/
touch trx-emc-testing.log
 
echo '\033[9;0]' > /dev/tty1 # disable blanking the display
 
tinybasic=0
tinypro=0
tinymax=0
case $1 in
  -basic)  tinybasic=1 ;;
  -pro)  tinypro=1 ;;
  -max)  tinymax=1 ;;
  *)
esac
 
imx6_sata_cp=0
imx6_sata_stress=0
case $2 in
  -sata_cp) imx6_sata_cp=1 ;;
  -sata_stress) imx6_sata_stress=1 ;;
  *)
esac
 
# mount devices
mountDevice $3 usb0
mountDevice $4 usb1
mountDevice $5 mmc0
if [ "${imx6_sata_cp}" -eq "1" ] || [ "${imx6_sata_stress}" -eq "1" ]; then
  mountDevice $5 sata
fi
 
updateLogFiles() {
  currentTime=`date +%Y-%m-%d.%H_%M`
  mv trx-emc-testing.log trx-emc-testing.log.$currentTime
}
 
finish_test_now() {
  echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) Ctrl+C Detected: End of the test"
  precced=0;
  #kill -INT $vid_pid $str_pid $ping_pid;
  sleep 3;
  test_status=`cat trx-emc-testing.log | grep -i "error" | grep -v -e "0 errors" -e "no corrected errors"`
  if [ -z "$test_status" ]
  then
  echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) PASS - Script ended without detected errors."
  else
  cat trx-emc-testing.log | grep -i "error" | grep -v -e "0 errors" -e "no corrected errors" -e "List of detected errors:"
  fi
  updateLogFiles
  exit;
}
 
# kill all processes if Ctrl+C is detected
trap finish_test_now 2
 
# connect ethernet loopback and force the ethernet to 100Mbit
ethtool -s eth0 speed 100 autoneg off
 
# play a video stream from HDMI input - testing also HDMI output
gst-launch -q imxv4l2src ! autovideosink &
 
# stressapptest - one thread CPU, one thread memory
if [ "${tinybasic}" -eq "1" ]; then
  ./stressapptest -s 600000 -M 100 -m 1 -C 1 --printsec 10 &
  str_pid=$!
fi
if [ "${tinypro}" -eq "1" ] && [ "${imx6_sata_stress}" -eq "1" ]; then
  ./stressapptest -s 600000 -M 200 -m 1 -C 1 --printsec 10 &
  str_pid=$!
else
  ./stressapptest -f /media/sata/tmp-file1 -s 600000 -M 200 -m 1 -C 1 --printsec 10 &
  str_pid=$!
fi
if [ "${tinymax}" -eq "1" ] && [ "${imx6_sata_stress}" -eq "1" ]; then
  ./stressapptest -f /media/sata/tmp-file1 -s 600000 -M 500 -m 1 -C 1 --printsec 10 &
  str_pid=$!
else
  ./stressapptest -s 600000 -M 500 -m 1 -C 1 --printsec 10 &
  str_pid=$!
fi
 
echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) Starting stressapptest with PID: " $str_pid
 
ping 192.168.0.160 &
ping_pid=$!
echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) Starting ping: " $ping_pid
 
proceed=1
file1="blackbird.wav"
file2="blackbird2.wav"
 
cp1_from="/media/mmc0/"
cp1_to="/media/usb0/"
 
if [ "${imx6_sata_cp}" -eq "1" ] || [ "${imx6_sata_stress}" -eq "1" ]; then
  cp2_from="/media/sata/"
  cp2_to="/media/usb1/"
else
  cp2_from="/media/mmc0/"
  cp2_to="/media/usb1/"
fi
 
#copy files in case they are missing
cp /media/$file1 $cp1_from$file1
cp /media/$file1 $cp1_to$file1
cp /media/$file2 $cp2_from$file2
cp /media/$file2 $cp2_to$file2
 
while [ $proceed -eq 1 ]
do 
 
  cp1_done=`ps | grep $cp1_pid | grep cp`
  if [ -z "$cp1_done" ]; then # copy finished
    if cmp -s $cp1_from$file1 $cp1_to$file1; then
      echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) PASS: Copying file from $cp1_from to $cp1_to successful"
    else
      echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) ERROR: Difference between files on $cp1_from and $cp1_to detected"
    fi
    cp1_temp=$cp1_from # swap destinations
    cp1_from=$cp1_to
    cp1_to=$cp1_temp
      
    rm $cp1_to$file1 # remove destination file
      
    cp $cp1_from$file1 $cp1_to$file1 &
    cp1_pid=$!
    echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) Started copying file from $cp1_from to $cp1_to"
  fi
    
  cp2_done=`ps | grep $cp2_pid | grep cp`
  if [ -z "$cp2_done" ]; then # copy finished
    if cmp -s $cp2_from$file2 $cp2_to$file2; then
      echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) PASS: Copying file from $cp2_from to $cp2_to successful"
    else
      echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) ERROR: Difference between files on $cp2_from and $cp2_to detected"
    fi
    cp2_temp=$cp2_from # swap destinations
    cp2_from=$cp2_to
    cp2_to=$cp2_temp
      
    rm $cp2_to$file2 # remove destination file
      
    cp $cp2_from$file2 $cp2_to$file2 &
    cp2_pid=$!
    echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) Started copying file from $cp2_from to $cp2_to"
  fi
 
done


The original article can be accessed on the iMX6Rex.com website.