Difference between revisions of "iMX6 TinyRex Environmental chamber testing"

From Voipac Wiki
Jump to navigation Jump to search
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:iMX6 TinyRex Development kit]]
+
[[Category:iMX6 TinyRex Development Kit]]
 
<!-- -->
 
<!-- -->
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
  
On this page environmental stress testing results of iMX6 TinyRex Development kit are displayed. Detailed instructions how to setup iMX6 TinyRex Development kit are also shown.
+
On this page environmental stress testing results of iMX6 TinyRex Development Kit are displayed. Detailed instructions how to setup boards are also shown.
  
 
== Hardware configuration ==
 
== Hardware configuration ==
 
All of the modules used standard specification except of the temperature ranges for the key components as described below:
 
All of the modules used standard specification except of the temperature ranges for the key components as described below:
 
<br />
 
<br />
* 3x iMX6 TinyRex Development kit in [[iMX6 TinyRex Max|Max configuration]]
+
* 3x iMX6 TinyRex Development Kit in [[iMX6 TinyRex Max|Max configuration]]
 
** i.MX6 Quad 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
 
** i.MX6 Quad 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
 
** 2GB DDR3 Memory (4x 4Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 2GB DDR3 Memory (4x 4Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
 
<br />
 
<br />
* 3x iMX6 TinyRex Development kit in [[iMX6 TinyRex Pro|Pro configuration]]
+
* 3x iMX6 TinyRex Development Kit in [[iMX6 TinyRex Pro|Pro configuration]]
 
** i.MX6 Dual 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
 
** i.MX6 Dual 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
 
** 1GB DDR3 Memory (4x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 1GB DDR3 Memory (4x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
 
<br />
 
<br />
* 3x iMX6 TinyRex Development kit in [[iMX6 TinyRex Basic|Basic configuration]]
+
* 3x iMX6 TinyRex Development Kit in [[iMX6 TinyRex Basic|Basic configuration]]
 
** i.MX6 Solo 1.0 GHz CPU - extended temperature range (-20°C to +105°C)
 
** i.MX6 Solo 1.0 GHz CPU - extended temperature range (-20°C to +105°C)
 
** 512MB DDR3 Memory (2x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 512MB DDR3 Memory (2x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
 
** 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)
<br /><br />
+
<br />
All of the tested development kits used the standard configuration of iMX6 TinyRex Base Board with extended temperature range (-20°C to +85°C). The majority of tested kits used a standard heatsink. This heatsink sized 35x35x10mm is included in every development kit package. Thus these measurements show the actual performance of web shop configuration of the development kit. Some of the boards were mounted into a custom build [https://www.voipac.com/#iMX6-ALC-00000000 iMX6 TinyRex aluminium case].
+
All of the tested development kits used standard configuration of iMX6 TinyRex Base Board with extended temperature range (-20°C to +85°C). The majority of tested kits used a standard heatsink. This heatsink sized 35x35x10mm is included in every development kit package. Thus these measurements show the actual performance of web shop based configuration. Some of the boards were mounted into a custom build [https://www.voipac.com/imx6-tinyrex-heatsink-set iMX6 TinyRex aluminium case].
 
<br />
 
<br />
  
The setup in environmental chamber:<br />
+
The setup in the environmental chamber:<br />
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Boards_in_the_chamber.jpg|800px]]
+
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Boards_in_the_chamber.jpg|800px]]
  
 
== Test description ==
 
== Test description ==
Three iMX6 TinyRex Development Kits (one in Max, one in Pro and one in Basic version) were running full peripheral test and stressed all the peripherals in various temperatures. All the rest of the boards were running CPU and memory test to check the reliability and stability of the firmware and hardware design.<br /><br />
+
Three iMX6 TinyRex Development Kits (one in Max, one in Pro and one in Basic version) were running full peripheral test and stressed all the peripherals in different range of temperatures. All the rest of the boards were running CPU and memory tests to check the reliability and stability of the firmware and hardware design.<br /><br />
  
Configurations, software and running testing threads in details:<br /><br />
+
Configuration, software and testing threads in details:<br /><br />
  
 
'''3x iMX6 TinyRex peripheral stress testing'''
 
'''3x iMX6 TinyRex peripheral stress testing'''
Line 38: Line 38:
 
* 1 thread of CPU stress test
 
* 1 thread of CPU stress test
 
* SATA stress test (applied for Max and Pro versions only)
 
* SATA stress test (applied for Max and Pro versions only)
* receiving HDMI Input signal through video input circuitry and processing
+
* receiving and processing HDMI Input signal through video input circuitry
* sending HDMI Output signal to external monitor
+
* sending this video stream over HDMI Output to external monitor
 
* copying a file from the first USB drive to SD card and vice versa
 
* copying a file from the first USB drive to SD card and vice versa
 
* copying a file from the second USB device to SATA hard drive and vice versa (applied for Max and Pro versions)
 
* copying a file from the second USB device to SATA hard drive and vice versa (applied for Max and Pro versions)
Line 54: Line 54:
 
* serial FTDI cable used for displaying messages
 
* serial FTDI cable used for displaying messages
 
* firmware running from SD card
 
* firmware running from SD card
* one set mounted inside aluminium case
+
* one set mounted inside the aluminium case
 
<br />
 
<br />
 
'''2x iMX6 TinyRex Pro Memory stress testing'''
 
'''2x iMX6 TinyRex Pro Memory stress testing'''
Line 62: Line 62:
 
* serial FTDI cable used for displaying messages
 
* serial FTDI cable used for displaying messages
 
* firmware running from SD card
 
* firmware running from SD card
* one set mounted inside aluminium case
+
* one set mounted inside the aluminium case
 
<br />
 
<br />
 
'''2x iMX6 TinyRex Basic Memory stress testing'''
 
'''2x iMX6 TinyRex Basic Memory stress testing'''
Line 70: Line 70:
 
* serial FTDI cable used for displaying messages
 
* serial FTDI cable used for displaying messages
 
* firmware running from SD card
 
* firmware running from SD card
* one set mounted inside aluminium case
+
* one set mounted inside the aluminium case
 
+
<br />
USB flash devices and SATA hard drives were place outside of the environmental chamber. All the scripts running during the test and the board setup instructions can be found n section [[#Preparing the test|How to prepare the test]].
+
USB flash devices and SATA hard drives were placed outside the environmental chamber. All the scripts running during the test and the board setup instructions can be found in section [[#Preparing the test|How to prepare the test]].
  
 
== Testing Results ==
 
== Testing Results ==
 
The picture below shows the temperature profile during the whole testing process:<br />
 
The picture below shows the temperature profile during the whole testing process:<br />
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Temperature_profile.jpg|800px]]
+
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Temperature_profile.png|680px]]
  
=== Running the boards at -40°C - PASS ===
+
=== Running the boards at -40°C PASS ===
Test description: CPU, Memory and peripheral stress tests were running at -40°C. All the tested kits were working without errors during the whole time, even if some components used for iMX6 TinyRex Basic Module were only rated to -20°C to +105°C operating temperature range. iMX6 TinyRex Base Boards were running at this temperature with components certified only in -20°C to +85°C temperature range.<br /><br />
+
Test description: CPU, Memory and peripheral stress tests were running at -40°C. All the tested kits were working without errors during the whole time, even if some components used for iMX6 TinyRex Module Basic were only rated for temperature range between -20°C and +105°C. iMX6 TinyRex Base Boards were running at this temperature with components certified only from -20°C to +85°C temperature range.<br /><br />
  
Zoom on the temperature chamber displaying the minimum temperature. These readouts are shown on the display:
+
A closer image on the temperature chamber displaying the minimum temperature is shown below. These readouts are available on the display:
 
* the first number shows relative humidity
 
* the first number shows relative humidity
 
* the second one current temperature  
 
* the second one current temperature  
 
* the last one the dew point
 
* the last one the dew point
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Boards_at_40°C.jpg|800px]]
+
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Boards_at_40°C.jpg|800px]]
 
 
=== Running the boards at +70°C - PASS ===
 
Test description: Ambient temperature was set to +70°C and the CPU and Memory stress tests were running.<br />
 
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Logs_+70°C.jpg|800px]]
 
  
 
=== Running the kits at high temperatures (from +60°C to +100°C) – PASS ===
 
=== Running the kits at high temperatures (from +60°C to +100°C) – PASS ===
Test description: The ambient temperature was gradually increasing (from 60°C up to 100°C) while CPU, Memory and peripheral stress tests were running. CPUs starting to work with lowered frequency were used as a threshold (this occurred when CPU temperature reached 70°C-100°C). Components used for iMX6 TinyRex Base Board were only rated from -20°C to +85°C operating temperature range.<br />
+
Test description: The ambient temperature was gradually increasing (from 60°C up to 100°C) while CPU, Memory and peripheral stress tests were running. The moment when CPU frequency had decreased was used as a test threshold (this occurred when CPU temperature reached +70°C up to +100°C). Components used for iMX6 TinyRex Base Boards were only rated from -20°C to +85°C operating temperature range.<br />
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Boards_at_+100°C.jpg|800px]]
+
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Boards_at_+100°C.jpg|800px]]
  
=== Temperature stress test – quick temperature change from -40°C to -10°C and back – PASS ===
+
=== Temperature stress test – quick change from -40°C to -10°C and back – PASS ===
Test description: The ambient temperature was quickly increased from -40°C to -10°C and then back to -40°C. The boards were running CPU, Memory and peripheral stress tests. All the boards were working perfectly.
+
Test description: The ambient temperature was quickly increased from -40°C to -10°C and then back to -40°C. The boards were running CPU, Memory and peripheral stress tests. All the boards were working correctly.
  
=== Temperature stress test – quick temperature change from +90°C to +30°C and back – PASS ===
+
=== Temperature stress test – quick change from +90°C to +30°C and back – PASS ===
Test description: The ambient temperature was quickly decreased from +90°C to +30°C and back to 90°C while running CPU, Memory and peripheral stress tests. All boards were working without errors.<br /><br />
+
Test description: The ambient temperature was quickly decreased from +90°C to +30°C and back to +90°C while running CPU, Memory and peripheral stress tests. All boards were working without errors.<br /><br />
  
Thermal camera capture focused on the boards as the set temperature inside the chamber reached +85°C:<br />
+
Thermal camera focused on the boards as the set temperature inside the chamber reached +85°C:<br />
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Thermo_camera_capture_at_+85°C.jpg|800px]]
+
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Thermo_camera_capture_at_+85°C.png|800px]]
  
 
=== Switch ON/OFF test – PASS ===
 
=== Switch ON/OFF test – PASS ===
Test description: At temperatures from -30°C to -40°C the boards were switched OFF, left OFF for at least 5 minutes (to cool down completely) and then switched ON to see if they boot up without problems. Once booted up to the Linux, the boards were turned off again. All of the tested boards booted up successfully. This test was performed 3 times at -30°C, -35°C and -40°C temperatures.
+
Test description: At temperatures from -30°C to -40°C the boards were switched OFF, left OFF for at least 5 minutes (to cool down completely) and then switched ON to see if they boot up without problems. Once booted up into Linux, the boards were turned off again. All of the tested boards booted up successfully. This test was performed 3 times at -30°C, -35°C and -40°C temperatures.
  
 
=== Cooling performance at high temperatures ===
 
=== Cooling performance at high temperatures ===
Test description: As mentioned above, different heatsinks and enclosures were utilized to be able to compare its cooling abilities. All these tests were performed with Max boards which generates the most heat by itself. All setup reached temperature +85°C in the chamber. The board in the enclosure with the biggest height and cooling fins on the top size reached +100°C.<br />
+
Test description: As mentioned above, different heatsinks and enclosures were utilized in order to compare the cooling abilities. All these tests were performed with Max version which generate the most heat by itself. All setup reached temperature +85°C in the chamber while still successfully running. The board in the enclosure with the biggest height and cooling fins on the top size reached +100°C.<br />
 
{|
 
{|
|[[image:iMX6_TinyRex_Development_kit-Env_chamber-Board_in_enclosure.jpg|396px]]
+
|[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Board_in_enclosure.jpg|396px]]
|[[image:iMX6_TinyRex_Development_kit-Env_chamber-Enclosure.jpg|396px]]
+
|[[image:iMX6 TinyRex Development Kit-Env chamber-Enclosure.jpg|396px]]
 
|}
 
|}
  
== Controlling PC setup ==
+
== PC setup ==
 +
During the test DHCP and FTP servers were utilised. The PC was also used during Ethernet ping test while controlling all the boards through SSH and serial console sessions. The control computer was running Windows 7 operating system.
  
 +
=== Setting the network ===
 +
Disable firewall (PC will not be connected to the Internet) and setup a static IP address: Press Windows button -> go to Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings (on the right side in the bar) -> double click on Local Area Connection -> Properties -> In the tab Networking go to Internet Protocol Version 4 (TCP/IPv4) -> type the static IP address and subnet mask as shown below:<br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Network_settings.png|400px]]
  
 +
=== Enabling sharing ===
 +
iMX6 TinyRex Development kits and the control PC are connected via Gigabit Ethernet switch. To ensure correct IP address assignment, turn on the PC first, connect it with the switch and only after that turn the switch on. To be able to download the files from the FTP server, sharing option need to be enabled first. This can be done by setting up the network as a ''work network''. Sharing can be enabled in Control Panel -> Network and Internet -> Network and Sharing Center -> Click to Choose homegroup and sharing options:<br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Network_sharing.png|710px]]
 +
 +
===  Setting up the TFTP and DHCP servers ===
 +
Tftpd32 software supports both TFTP and DHCP server options. For more details about DHCP configuration, follow the screenshots below:<br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-DHCP_settings.png|360px]]<br /><br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-DHCP_control.png|460px]]
 +
 +
=== SSH and Serial consoles ===
 +
To control iMX6 TinyRex Development Kits, one TeraTerm serial console was opened per board. SSH clients were used to read temperature. For the boards with the peripheral test, an extra SSH client was established to be able to spot possible errors or warnings if occurred.<br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Serial_console.png|800px]]
 +
<br /><br />
 +
The setup of the environmental chamber cables and out-of-chamber equipment:<br />
 +
[[image:iMX6_TinyRex_Development_Kit-Env_chamber-Setup_overview.jpg|800px]]
  
 
== Preparing the test ==
 
== Preparing the test ==
=== SD card setup ===
+
=== Boot device and software ===
[http://downloads.voipac.com/files/iMX6_TinyRex_Development_kit/module/software/linux/binaries/old/imx6rex-uImage-default-02-MAY-2014 Linux 4.1] kernel was used for this test. Modified Xubuntu filesystem can be accessed from [http://downloads.voipac.com/files/iMX6_TinyRex_Development_kit/module/software/filesystem/filesystem_download.txt here]. To create a new SD card, [[iMX6 TinyRex Pro Creating Bootable microSD Card|these instructions]] can be followed.
+
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 [[iMX6 TinyRex Max Creating Bootable microSD Card|these instructions]]. Here is an example of creating a SD card suitable for Max configuration:
 +
<syntaxhighlight lang="bash">
 +
git clone https://github.com/voipac/imx6tinyrex_bin_linux
 +
cd imx6tinyrex_bin_linux/
 +
sudo ./fsl-sdcard-partition.sh -max /dev/mmcblk0
 +
</syntaxhighlight>
  
=== Create the log files ===
+
=== Downloading stress test ===
 +
Stressapptest package was selected to check CPU and memory integrity. Placing this file into the same directory where the testing script will be stored is important:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
mkdir /home/ubuntu/testing-env-chamber
+
wget http://downloads.voipac.com/files/iMX6_TinyRex_Development_Kit/module/documents/Environmental_chamber_testing/stressapptest
cd /home/ubuntu/testing-env-chamber
 
touch cpu-temp.log
 
touch stressapptest.log
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 136: Line 154:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
To setup a cron tab, the file containing all cron jobs needs to be altered. Before running the crontab for the first time, selecting a text editor is required:
+
To setup a cron tab, the file containing all cron jobs needs to be altered. Before running the crontab for the first time, selecting a text editor is required:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sudo crontab -e
 
sudo crontab -e
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Paste the following line to the end of the cron list file. The output time format will be set the same as for stressapptest. Cron job performs a current CPU temperature readout and the data are saved in the log file:
+
Paste the following line to the end of the cron list file. The output time format will be set the same as for stressapptest. Cron job performs a current CPU temperature readout and the data are saved in the log file. The log format was selected identical to the one used by stressapptest package:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
* * * * * { echo -n $(date +\%Y/\%m/\%d-\%T); echo -n "("; echo -n $(date +\%Z); echo -n ") "; cat /sys/devices/virtual/thermal/thermal_zone0/temp; } >> /home/ubuntu/testing-env-chamber/cpu-temp.log
+
* * * * * { echo -n $(date +%Y/%m/%d-%T); echo -n "("; echo -n $(date +%Z); echo -n ") "; cat /sys/devices/virtual/thermal/thermal_zone0/temp; } >> ~/testing-env-chamber/cpu-temp.log
 
</syntaxhighlight>
 
</syntaxhighlight>
 
'''''Note:''''' The percent sign '%' has a special purpose in the cron file. As this sign is needed to write the date formats, the backslash is required to be placed before the percent sign: '\%'.
 
'''''Note:''''' The percent sign '%' has a special purpose in the cron file. As this sign is needed to write the date formats, the backslash is required to be placed before the percent sign: '\%'.
  
=== Setup the SSH connections ===
+
=== Setting up the date ===
During the testing a simple local Ethernet network utilising a LAN switch and a control laptop was created. Two SSH sessions per board were opened (8 sessions in total). The first session was used for CPU and memory stress test. In the window below the current CPU temperature was printed out. The other three boards used the same format:
+
If the master PC is equipped with a timeserver, server date and time can be automatically obtained using this Linux feature:
[[image:iMX6_TinyRex_Development_kit-Env_chamber-Logs_setup.jpg|800px]]
+
<syntaxhighlight lang="bash">
 +
ntpdate 192.168.0.2
 +
</syntaxhighlight>
 +
 
 +
Time and date can also be set up manually (use format MMDDhhmmYYYY e.g. 07th of July 2016 4:27 pm):
 +
<syntaxhighlight lang="bash">
 +
date 071116272016
 +
</syntaxhighlight>
 +
 
 +
=== Setup the CPU temperature printout ===
 +
Open one SSH client per board where CPU temperature will be shown. Tail command is utilized to display the last part of the log file, which is filled up as the CRON job outputs the current readouts:
 +
<syntaxhighlight lang="bash">
 +
tail -F cpu-temp-measuring.log
 +
</syntaxhighlight>
 +
 
 +
=== Error checking during peripheral test ===
 +
To make sure tests are running smoothly, potential errors can be detected by opening another SSH session:
 +
<syntaxhighlight lang="bash">
 +
tail -f env-chamber-testing.log | grep -i "error"
 +
</syntaxhighlight>
  
=== Set up the date ===
+
=== Play video file for peripheral test ===
As the RTC clock was not used during the test, the current time is set after boards boot up. A time zone is updated first:
+
To be able to test HDMI Input during the peripheral testing, a video file was played from boards which were running memory stress tests only. Infinite loop is opened in another SSH session:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
ln -sf /usr/share/zoneinfo/Europe/Bratislava /etc/localtime
+
while [ true ]; do gst-play-1.0 /media/ploughing.mp4; done
 
</syntaxhighlight>
 
</syntaxhighlight>
  
The actual time is changed afterwards. Sequence of digits in the following order was used: month day hour minute year. The command below sets this time and date: 04-July-2014 08:26
+
=== Start CPU and memory stress test ===
 +
Navigate into the directory, where stressapptest feature and test are stored.<br /><br />
 +
 
 +
Stress command for Max configuration:
 +
<syntaxhighlight lang="bash">
 +
./stressapptest -s 600000 -M 1000 -m 4 -C 4 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100
 +
</syntaxhighlight>
 +
 
 +
Stress command for Pro configuration:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
date 070408262014
+
./stressapptest -s 600000 -M 700 -m 2 -C 2 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Setup the CPU temperature printout ===
+
Stress command for Basic configuration:
Before the CPU and memory stress tests start, the old logs were backed up:
+
<syntaxhighlight lang="bash">
 +
./stressapptest -s 600000 -M 150 -m 1 -C 1 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100
 +
</syntaxhighlight>
 +
 
 +
=== Start peripheral test ===
 +
Before the test start it is a good practice to make sure that all the devices were plugged in successfully. To find out where the devices were mounted following command can be used:
 +
<syntaxhighlight lang="bash">
 +
fdisk -l
 +
</syntaxhighlight>
 +
 
 +
The testing script uses multiple variables to specify its operation. As the first parameter board configuration is used (-max, -pro or -basic). As other parameters device names
 +
are written in the following order: the first USB stick, the second USB, SD card and SATA drive (if used). All logs are stored into a single file.<br /><br />
 +
 
 +
Starting peripheral test for Max configuration:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
cd /home/ubuntu/testing-env-chamber
+
./imx6-tinyrex-v1i1-peripheral-test.sh -max sdb1 sdc1 mmcblk2p2 sda2 2>&1 | tee -i trx-env-chamber-testing.log
mv cpu-temp.log cpu-temp-testing1.log
 
mv stressapptest.log stressapptest-testing1.log
 
touch cpu-temp.log
 
touch stressapptest.log
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Tail command is used to read the temperature. It displays the last part of files (the cron job is writing to this log file):
+
Starting peripheral test for Pro configuration:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
tail -F cpu-temp.log
+
./imx6-tinyrex-v1i1-peripheral-test.sh -pro sdb1 sdc1 mmcblk2p2 sda1 2>&1 | tee -i trx-env-chamber-testing.log
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Start the stress test ===
+
Starting peripheral test for Basic configuration:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
stressapptest -s 600000 -M 768 -m 4 -C 4 -W --printsec 600 -l /home/ubuntu/testing-env-chamber/stressapptest.log
+
./imx6-tinyrex-v1i1-peripheral-test.sh -basic sda1 sdb1 mmcblk2p2 2>&1 | tee -i trx-env-chamber-testing.log
 
</syntaxhighlight>
 
</syntaxhighlight>
  
To make sure test is running smoothly, potential errors can be found in the log file (instead of rolling the stress test printout):
+
The complete script can be found in [http://downloads.voipac.com/files/iMX6_TinyRex_Development_Kit/module/documents/Environmental_chamber_testing/imx6-tinyrex-v1i1-peripheral-test.sh the download section] or down below:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
grep -i "error" stressapptest.log
+
#!/bin/sh
 +
 +
# iMX6 TinyRex environmental chamber peripheral test
 +
 
 +
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 env-chamber-testing/
 +
cd env-chamber-testing/
 +
 
 +
touch trx-env-chamber-testing.log
 +
touch trx-cpu-temp.log
 +
 +
tinybasic=0
 +
tinypro=0
 +
tinymax=0
 +
case $1 in
 +
  -basic)  tinybasic=1 ;;
 +
  -pro)  tinypro=1 ;;
 +
  -max)  tinymax=1 ;;
 +
  *)
 +
esac
 +
 
 +
# mount devices
 +
mountDevice $2 usb0
 +
mountDevice $3 usb1
 +
mountDevice $4 mmc0
 +
if [ "${tinypro}" -eq "1" ] || [ "${tinymax}" -eq "1" ]; then
 +
  mountDevice $5 sata
 +
fi
 +
 +
updateLogFiles() {
 +
  # obtain board ID from IP address - be sure addresses are allocated based on MAC
 +
  boardID=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | cut -d'.' -f4 | cut -d'2' -f2);
 +
  # be sure time server is running on DHCP server
 +
  currentTime=`date +%Y-%m-%d.%H:%M`
 +
 
 +
  mv trx-env-chamber-testing.log trx-board-$boardID-env-chamber.log.$currentTime
 +
  mv trx-cpu-temp.log trx-board-$boardID-env-cpu-temp.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 $log_pid;
 +
  sleep 3;
 +
  test_status=`cat trx-env-chamber-testing.log | grep -i "error" | grep -v -e "0 errors" -e "no corrected errors"`
 +
  if [ -z "$test_status" ]
 +
  then
 +
    echo "*********TEST PASS*********"
 +
  else
 +
    echo "*********TEST FAIL*********"
 +
    echo "List of detected errors:"
 +
    cat trx-env-chamber-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
 +
 +
# play a video stream from HDMI input - testing also HDMI output
 +
gst-launch -q imxv4l2src ! autovideosink &
 +
 +
# stressapptest - one thread CPU, one thread memory, sata thread (if possible)
 +
if [ "${tinybasic}" -eq "1" ]; then
 +
  ./stressapptest -s 600000 -M 100 -m 1 -C 1 --printsec 10 &
 +
  str_pid=$!
 +
fi
 +
if [ "${tinypro}" -eq "1" ]; then
 +
  ./stressapptest -f /media/sata/tmp-file1 -s 600000 -M 200 -m 1 -C 1 --printsec 10 &
 +
  str_pid=$!
 +
fi
 +
if [ "${tinymax}" -eq "1" ]; then
 +
  ./stressapptest -f /media/sata/tmp-file1 -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
 +
 
 +
proceed=1
 +
file1="blackbird.wav"
 +
file2="blackbird2.wav"
 +
 +
cp1_from="/media/mmc0/"
 +
cp1_to="/media/usb0/"
 +
 +
cp2_from="/media/sata/"
 +
cp2_to="/media/usb1/"
 +
 +
#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
 +
 +
  ping -q -c1 192.168.0.2 >> trx-env-chamber-testing.log
 +
  if [ $? -ne 0 ]
 +
  then
 +
    echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) ERROR: Ping failed"
 +
  fi
 +
 
 +
  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
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
<br />
 
<br />
The original article can be accessed on the [https://www.imx6rex.com/software/memory-stress-testing-in-environmental-chamber/ iMX6TinyRex.com website].
+
The original article can be accessed on the [https://www.imx6rex.com/imx6-tiny-rex/software/imx6-tinyrex-production-testing-in-environmental-chamber/ iMX6Rex.com website].

Latest revision as of 13:40, 24 April 2022

On this page environmental stress testing results of iMX6 TinyRex Development Kit are displayed. Detailed instructions how to setup boards are also shown.

Hardware configuration

All of the modules used standard specification except of the temperature ranges for the key components as described below:

  • 3x iMX6 TinyRex Development Kit in Max configuration
    • i.MX6 Quad 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
    • 2GB DDR3 Memory (4x 4Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
    • 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)


  • 3x iMX6 TinyRex Development Kit in Pro configuration
    • i.MX6 Dual 1.0 GHz CPU - automotive temperature range (-40°C to +125°C)
    • 1GB DDR3 Memory (4x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
    • 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)


  • 3x iMX6 TinyRex Development Kit in Basic configuration
    • i.MX6 Solo 1.0 GHz CPU - extended temperature range (-20°C to +105°C)
    • 512MB DDR3 Memory (2x 2Gb DDR3 Memory chips) - industrial temperature range (-40°C to +95°C)
    • 1GBps Ethernet PHY Tranciever KSZ9031RN - automotive temperature range (-40°C to +85°C)


All of the tested development kits used standard configuration of iMX6 TinyRex Base Board with extended temperature range (-20°C to +85°C). The majority of tested kits used a standard heatsink. This heatsink sized 35x35x10mm is included in every development kit package. Thus these measurements show the actual performance of web shop based configuration. Some of the boards were mounted into a custom build iMX6 TinyRex aluminium case.

The setup in the environmental chamber:
iMX6 TinyRex Development Kit-Env chamber-Boards in the chamber.jpg

Test description

Three iMX6 TinyRex Development Kits (one in Max, one in Pro and one in Basic version) were running full peripheral test and stressed all the peripherals in different range of temperatures. All the rest of the boards were running CPU and memory tests to check the reliability and stability of the firmware and hardware design.

Configuration, software and testing threads in details:

3x iMX6 TinyRex peripheral stress testing

  • 1 thread of extensive Memory stress test
  • 1 thread of CPU stress test
  • SATA stress test (applied for Max and Pro versions only)
  • receiving and processing HDMI Input signal through video input circuitry
  • sending this video stream over HDMI Output to external monitor
  • copying a file from the first USB drive to SD card and vice versa
  • copying a file from the second USB device to SATA hard drive and vice versa (applied for Max and Pro versions)
  • copying a file from the second USB drive to SD card and vice versa (applied for Basic version)
  • pinging the host PC via Ethernet
  • all the messages were printed out on the serial console through connected FTDI cable
  • firmware running from SD card
  • standard 35x35x10mm heatsink


2x iMX6 TinyRex Max Memory stress testing

  • 4 threads of extensive Memory stress test
  • 4 threads of CPU stress test
  • reading CPU temperature via SSH Ethernet session
  • serial FTDI cable used for displaying messages
  • firmware running from SD card
  • one set mounted inside the aluminium case


2x iMX6 TinyRex Pro Memory stress testing

  • 2 threads of extensive Memory stress test
  • 2 threads of CPU stress test
  • reading CPU temperature via SSH Ethernet session
  • serial FTDI cable used for displaying messages
  • firmware running from SD card
  • one set mounted inside the aluminium case


2x iMX6 TinyRex Basic Memory stress testing

  • 1 threads of extensive Memory stress test
  • 1 threads of CPU stress test
  • reading CPU temperature via SSH Ethernet session
  • serial FTDI cable used for displaying messages
  • firmware running from SD card
  • one set mounted inside the aluminium case


USB flash devices and SATA hard drives were placed outside the environmental chamber. All the scripts running during the test and the board setup instructions can be found in section How to prepare the test.

Testing Results

The picture below shows the temperature profile during the whole testing process:
iMX6 TinyRex Development Kit-Env chamber-Temperature profile.png

Running the boards at -40°C – PASS

Test description: CPU, Memory and peripheral stress tests were running at -40°C. All the tested kits were working without errors during the whole time, even if some components used for iMX6 TinyRex Module Basic were only rated for temperature range between -20°C and +105°C. iMX6 TinyRex Base Boards were running at this temperature with components certified only from -20°C to +85°C temperature range.

A closer image on the temperature chamber displaying the minimum temperature is shown below. These readouts are available on the display:

  • the first number shows relative humidity
  • the second one current temperature
  • the last one the dew point

iMX6 TinyRex Development Kit-Env chamber-Boards at 40°C.jpg

Running the kits at high temperatures (from +60°C to +100°C) – PASS

Test description: The ambient temperature was gradually increasing (from 60°C up to 100°C) while CPU, Memory and peripheral stress tests were running. The moment when CPU frequency had decreased was used as a test threshold (this occurred when CPU temperature reached +70°C up to +100°C). Components used for iMX6 TinyRex Base Boards were only rated from -20°C to +85°C operating temperature range.
iMX6 TinyRex Development Kit-Env chamber-Boards at +100°C.jpg

Temperature stress test – quick change from -40°C to -10°C and back – PASS

Test description: The ambient temperature was quickly increased from -40°C to -10°C and then back to -40°C. The boards were running CPU, Memory and peripheral stress tests. All the boards were working correctly.

Temperature stress test – quick change from +90°C to +30°C and back – PASS

Test description: The ambient temperature was quickly decreased from +90°C to +30°C and back to +90°C while running CPU, Memory and peripheral stress tests. All boards were working without errors.

Thermal camera focused on the boards as the set temperature inside the chamber reached +85°C:
iMX6 TinyRex Development Kit-Env chamber-Thermo camera capture at +85°C.png

Switch ON/OFF test – PASS

Test description: At temperatures from -30°C to -40°C the boards were switched OFF, left OFF for at least 5 minutes (to cool down completely) and then switched ON to see if they boot up without problems. Once booted up into Linux, the boards were turned off again. All of the tested boards booted up successfully. This test was performed 3 times at -30°C, -35°C and -40°C temperatures.

Cooling performance at high temperatures

Test description: As mentioned above, different heatsinks and enclosures were utilized in order to compare the cooling abilities. All these tests were performed with Max version which generate the most heat by itself. All setup reached temperature +85°C in the chamber while still successfully running. The board in the enclosure with the biggest height and cooling fins on the top size reached +100°C.

iMX6 TinyRex Development Kit-Env chamber-Board in enclosure.jpg iMX6 TinyRex Development Kit-Env chamber-Enclosure.jpg

PC setup

During the test DHCP and FTP servers were utilised. The PC was also used during Ethernet ping test while controlling all the boards through SSH and serial console sessions. The control computer was running Windows 7 operating system.

Setting the network

Disable firewall (PC will not be connected to the Internet) and setup a static IP address: Press Windows button -> go to Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings (on the right side in the bar) -> double click on Local Area Connection -> Properties -> In the tab Networking go to Internet Protocol Version 4 (TCP/IPv4) -> type the static IP address and subnet mask as shown below:
iMX6 TinyRex Development Kit-Env chamber-Network settings.png

Enabling sharing

iMX6 TinyRex Development kits and the control PC are connected via Gigabit Ethernet switch. To ensure correct IP address assignment, turn on the PC first, connect it with the switch and only after that turn the switch on. To be able to download the files from the FTP server, sharing option need to be enabled first. This can be done by setting up the network as a work network. Sharing can be enabled in Control Panel -> Network and Internet -> Network and Sharing Center -> Click to Choose homegroup and sharing options:
iMX6 TinyRex Development Kit-Env chamber-Network sharing.png

Setting up the TFTP and DHCP servers

Tftpd32 software supports both TFTP and DHCP server options. For more details about DHCP configuration, follow the screenshots below:
iMX6 TinyRex Development Kit-Env chamber-DHCP settings.png

iMX6 TinyRex Development Kit-Env chamber-DHCP control.png

SSH and Serial consoles

To control iMX6 TinyRex Development Kits, one TeraTerm serial console was opened per board. SSH clients were used to read temperature. For the boards with the peripheral test, an extra SSH client was established to be able to spot possible errors or warnings if occurred.
iMX6 TinyRex Development Kit-Env chamber-Serial console.png

The setup of the environmental chamber cables and out-of-chamber equipment:
iMX6 TinyRex Development Kit-Env chamber-Setup overview.jpg

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 check CPU and memory integrity. 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/Environmental_chamber_testing/stressapptest

Setup the cron

To be able to check the CPU temperature every minute a new cron job was setup. For Ubuntu file systems postfix package installation is required:

sudo apt-get install postfix

To setup a cron tab, the file containing all cron jobs needs to be altered. Before running the crontab for the first time, selecting a text editor is required:

sudo crontab -e

Paste the following line to the end of the cron list file. The output time format will be set the same as for stressapptest. Cron job performs a current CPU temperature readout and the data are saved in the log file. The log format was selected identical to the one used by stressapptest package:

* * * * * { echo -n $(date +%Y/%m/%d-%T); echo -n "("; echo -n $(date +%Z); echo -n ") "; cat /sys/devices/virtual/thermal/thermal_zone0/temp; } >> ~/testing-env-chamber/cpu-temp.log

Note: The percent sign '%' has a special purpose in the cron file. As this sign is needed to write the date formats, the backslash is required to be placed before the percent sign: '\%'.

Setting up the date

If the master PC is equipped with a timeserver, server date and time can be automatically obtained using this Linux feature:

ntpdate 192.168.0.2

Time and date can also be set up manually (use format MMDDhhmmYYYY e.g. 07th of July 2016 4:27 pm):

date 071116272016

Setup the CPU temperature printout

Open one SSH client per board where CPU temperature will be shown. Tail command is utilized to display the last part of the log file, which is filled up as the CRON job outputs the current readouts:

tail -F cpu-temp-measuring.log

Error checking during peripheral test

To make sure tests are running smoothly, potential errors can be detected by opening another SSH session:

tail -f env-chamber-testing.log | grep -i "error"

Play video file for peripheral test

To be able to test HDMI Input during the peripheral testing, a video file was played from boards which were running memory stress tests only. Infinite loop is opened in another SSH session:

while [ true ]; do gst-play-1.0 /media/ploughing.mp4; done

Start CPU and memory stress test

Navigate into the directory, where stressapptest feature and test are stored.

Stress command for Max configuration:

./stressapptest -s 600000 -M 1000 -m 4 -C 4 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100

Stress command for Pro configuration:

./stressapptest -s 600000 -M 700 -m 2 -C 2 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100

Stress command for Basic configuration:

./stressapptest -s 600000 -M 150 -m 1 -C 1 -W -l ~/env-chamber-testing/stressapptest.log --printsec 100

Start peripheral test

Before the test start it is a good practice to make sure that all the devices were plugged in successfully. To find out where the devices were mounted following command can be used:

fdisk -l

The testing script uses multiple variables to specify its operation. As the first parameter board configuration is used (-max, -pro or -basic). As other parameters device names are written in the following order: the first USB stick, the second USB, SD card and SATA drive (if used). All logs are stored into a single file.

Starting peripheral test for Max configuration:

./imx6-tinyrex-v1i1-peripheral-test.sh -max sdb1 sdc1 mmcblk2p2 sda2 2>&1 | tee -i trx-env-chamber-testing.log

Starting peripheral test for Pro configuration:

./imx6-tinyrex-v1i1-peripheral-test.sh -pro sdb1 sdc1 mmcblk2p2 sda1 2>&1 | tee -i trx-env-chamber-testing.log

Starting peripheral test for Basic configuration:

./imx6-tinyrex-v1i1-peripheral-test.sh -basic sda1 sdb1 mmcblk2p2 2>&1 | tee -i trx-env-chamber-testing.log

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

#!/bin/sh
 
# iMX6 TinyRex environmental chamber peripheral test
  
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 env-chamber-testing/
cd env-chamber-testing/
   
touch trx-env-chamber-testing.log
touch trx-cpu-temp.log
 
tinybasic=0
tinypro=0
tinymax=0
case $1 in
  -basic)  tinybasic=1 ;;
  -pro)  tinypro=1 ;;
  -max)  tinymax=1 ;;
  *)
esac
  
# mount devices
mountDevice $2 usb0
mountDevice $3 usb1
mountDevice $4 mmc0
if [ "${tinypro}" -eq "1" ] || [ "${tinymax}" -eq "1" ]; then
  mountDevice $5 sata
fi
 
updateLogFiles() {
  # obtain board ID from IP address - be sure addresses are allocated based on MAC
  boardID=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | cut -d'.' -f4 | cut -d'2' -f2);
  # be sure time server is running on DHCP server
  currentTime=`date +%Y-%m-%d.%H:%M`
   
  mv trx-env-chamber-testing.log trx-board-$boardID-env-chamber.log.$currentTime
  mv trx-cpu-temp.log trx-board-$boardID-env-cpu-temp.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 $log_pid;
  sleep 3;
  test_status=`cat trx-env-chamber-testing.log | grep -i "error" | grep -v -e "0 errors" -e "no corrected errors"`
  if [ -z "$test_status" ]
  then
    echo "*********TEST PASS*********"
  else
    echo "*********TEST FAIL*********"
    echo "List of detected errors:"
    cat trx-env-chamber-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
 
# play a video stream from HDMI input - testing also HDMI output
gst-launch -q imxv4l2src ! autovideosink &
 
# stressapptest - one thread CPU, one thread memory, sata thread (if possible)
if [ "${tinybasic}" -eq "1" ]; then
  ./stressapptest -s 600000 -M 100 -m 1 -C 1 --printsec 10 &
  str_pid=$!
fi
if [ "${tinypro}" -eq "1" ]; then
  ./stressapptest -f /media/sata/tmp-file1 -s 600000 -M 200 -m 1 -C 1 --printsec 10 &
  str_pid=$!
fi
if [ "${tinymax}" -eq "1" ]; then
  ./stressapptest -f /media/sata/tmp-file1 -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
  
proceed=1
file1="blackbird.wav"
file2="blackbird2.wav"
 
cp1_from="/media/mmc0/"
cp1_to="/media/usb0/"
 
cp2_from="/media/sata/"
cp2_to="/media/usb1/"
 
#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
 
  ping -q -c1 192.168.0.2 >> trx-env-chamber-testing.log
  if [ $? -ne 0 ]
  then
    echo "$(date +\%Y/\%m/\%d-\%T)($(date +\%Z)) ERROR: Ping failed"
  fi
  
  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.