Skip to content
Snippets Groups Projects
Commit 0ade1106 authored by Tobias Kahlki's avatar Tobias Kahlki Committed by Tobias Kahlki
Browse files

mv:mx8mp: Adjust emission and immunity to MV interfaces

parent c32469d8
No related branches found
No related tags found
1 merge request!278mv:mx8mp: fix emission and immunity tests for modular vision
......@@ -16,77 +16,42 @@
#-----------------------------------------------------------------------------#
# PREPARATION #
#-----------------------------------------------------------------------------#
#Testimage_display FRAMEBUFFER=/dev/fb0 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI hdmiconfig unblank; hdmiconfig set 1920 1080 60 16; sleep 3; FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
Testimage_display bball_qml &
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
MMC_umount for i in `mount | grep mmcblk1 | awk '{print $1}'`; do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}' ) ;do umount $i; done
MMC_umount for i in $(mount | grep mmcblk1 | awk '{print $1}'); do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}'); do umount $i; done
Touchtest_remove_socket rm -f /touch_tst_socket
Touchtest_start touchmon -d -i /dev/input/event0 -s /touch_tst_socket -p 0
Battery_Charger_Active gpioset $(gpiofind EN_CHARGER)=1
Bluetooth_prepare /opt/ltp/scripts/bluetooth_l2test_service.sh 00:0E:8E:BB:4D:23 /tmp/l2test.log &
# Enable 24VOUT Rail
Enable_24VOUT echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_ON gpioset $(gpiofind "RELAY1_ON")=1
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
# Setup ADI lines
# ADI 0 as Analog Voltag input
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
# ADI 1 as Analog current input
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
# ADI 2 as Digital input
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
# ADI 3 as Digital input
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
CIM_5V_ON echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Wait_for_Bluetooth /opt/ltp/scripts/bluetooth_l2test_wait.sh /tmp/l2test.log
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Light_Sensor [ 2 -lt $( cat /sys/bus/iio/devices/iio\:device0/in_illuminance_raw ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
Bluetooth /opt/ltp/scripts/bluetooth_l2test.sh /tmp/l2test.log
#I2C i2c -q -d /dev/i2c-0 -s 0x68 -a 0x0a -b 0x0b -w 100 -i 150
# Modular Vision Carrier
Network_1 iptest -q -g 192.168.1.100 -n 1 -w 50
Network_wlan0 iptest -q -g 192.168.3.100 -n 1 -w 900 -a
RS485_1 rs485echo -d /dev/ttymxc0 -s 576000 -x 1000 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 576000 -x 1000 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 576000 -x 1000 -b 32 -n
#RS485_CIM /opt/ltp/testcases/bin/serialloop -d /dev/ttymxc3 -s 115200 -b 8 -r
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
24V_OUT [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
# ADI and DIG in
#ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1600 ] && [ "$v" -lt 1690 ]
#ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2000 ] && [ "$v" -lt 3000 ]
DIG_IN2 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN2) ) ]
DIG_IN3 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN3) ) ]
DIG_IN4 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN4) ) ]
DIG_IN5 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN5) ) ]
Battery_Charger [ "Charging" = "$(cat /sys/class/power_supply/battery-charger/status)" ]
Play_wave_file aplay /opt/ltp/runtest/ding_48kHz_16bit_s.wav
RS485 rs485echo -d /dev/ttymxc1 -s 576000 -x 100 -b 32
CAN can -n 2 -o 500
# Backlight + LVDS ?
MMC_write_25kB bwrite -q -n /dev/mmcblk1 -b 25000 -i 1
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1 # USB-A
USB_stick_2_write_25kB bwrite -q -n /dev/sdb -b 25000 -i 1 # USB-C
Touch touchmon -z -r /touch_tst_socket
Keypad_Test keypad_test
# Status LED
# Power LED
Serial0 serial -d /dev/ttymxc0 -q -b 115200 -c 5 -s 1024 -o 300
Serial1 serial -d /dev/ttymxc1 -q -b 115200 -c 5 -s 1024 -o 300
# DIO ?
# Modular Vision SMARC Module
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Wait sleep 1.0
#-----------------------------------------------------------------------------#
# CLEANUP #
#-----------------------------------------------------------------------------#
Touchtest_stop touchmon -t -r /touch_tst_socket -q
Testimage_display_stop killall bball_qml
#Testimage_display_stop killall qmlscene
Disable_24VOUT echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
Test_BT_stop killall l2pingd
Battery_Charger_disable gpioset $(gpiofind EN_CHARGER)=0
CIM_5V_OFF echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Bluetooth_stop for i in $(ps ax | grep "bluetooth_l2test_service.sh\|l2test" | grep -v "grep" | sed -e 's/ *\([0-9]\+\).*/\1/');do kill $i;done
Touchtest_stop touchmon -t -r /touch_tst_socket -q
\ No newline at end of file
......@@ -16,78 +16,44 @@
#-----------------------------------------------------------------------------#
# PREPARATION #
#-----------------------------------------------------------------------------#
#Testimage_display FRAMEBUFFER=/dev/fb0 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI hdmiconfig unblank; hdmiconfig set 1920 1080 60 16; sleep 3; FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
Fingerpaint_start fingerpaint_sdl &
#Testimage_display bball_qml &
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
MMC_umount for i in `mount | grep mmcblk1 | awk '{print $1}'`; do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}' ) ;do umount $i; done
Fingerpaint_start fingerpaint_sdl &
MMC_umount for i in $(mount | grep mmcblk1 | awk '{print $1}'); do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}'); do umount $i; done
Touchtest_remove_socket rm -f /touch_tst_socket
Touchtest_start touchmon -d -i /dev/input/event0 -s /touch_tst_socket -p 0
Battery_Charger_Active gpioset $(gpiofind EN_CHARGER)=1
Bluetooth_prepare /opt/ltp/scripts/bluetooth_l2test_service.sh 00:0E:8E:BB:4D:23 /tmp/l2test.log &
# Enable 24VOUT Rail
Enable_24VOUT echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_ON gpioset $(gpiofind "RELAY1_ON")=1
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
# Setup ADI lines
# ADI 0 as Analog Voltag input
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
# ADI 1 as Analog current input
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
# ADI 2 as Digital input
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
# ADI 3 as Digital input
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
CIM_5V_ON echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Keypad_Init keypad_init
Wait_for_Bluetooth /opt/ltp/scripts/bluetooth_l2test_wait.sh /tmp/l2test.log
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Light_Sensor [ 2 -lt $( cat /sys/bus/iio/devices/iio\:device0/in_illuminance_raw ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
Bluetooth /opt/ltp/scripts/bluetooth_l2test.sh /tmp/l2test.log
#I2C i2c -q -d /dev/i2c-0 -s 0x68 -a 0x0a -b 0x0b -w 100 -i 150
# Modular Vision Carrier
Network_1 iptest -q -g 192.168.1.100 -n 1 -w 50
Network_wlan0 iptest -q -g 192.168.3.100 -n 1 -w 900 -a
RS485_1 rs485echo -d /dev/ttymxc0 -s 576000 -x 1000 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 576000 -x 1000 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 576000 -x 1000 -b 32 -n
#RS485_CIM /opt/ltp/testcases/bin/serialloop -d /dev/ttymxc3 -s 115200 -b 8 -r
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
24V_OUT [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
# ADI and DIG in
#ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1600 ] && [ "$v" -lt 1690 ]
#ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2000 ] && [ "$v" -lt 3000 ]
DIG_IN2 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN2) ) ]
DIG_IN3 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN3) ) ]
DIG_IN4 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN4) ) ]
DIG_IN5 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN5) ) ]
Battery_Charger [ "Charging" = "$(cat /sys/class/power_supply/battery-charger/status)" ]
#Touch touchmon -z -r /touch_tst_socket
Play_wave_file aplay /opt/ltp/runtest/ding_48kHz_16bit_s.wav
RS485 rs485echo -d /dev/ttymxc1 -s 576000 -x 100 -b 32
CAN can -n 2 -o 500
# Backlight + LVDS ?
MMC_write_25kB bwrite -q -n /dev/mmcblk1 -b 25000 -i 1
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1 # USB-A
USB_stick_2_write_25kB bwrite -q -n /dev/sdb -b 25000 -i 1 # USB-C
Touch touchmon -z -r /touch_tst_socket
Keypad_Test keypad_test
# Status LED
# Power LED
Temp lm73temp -n lm75 -b 2 -d 004e
Serial0 serial -d /dev/ttymxc0 -q -b 115200 -c 5 -s 1024 -o 300
Serial1 serial -d /dev/ttymxc1 -q -b 115200 -c 5 -s 1024 -o 300
# DIO ?
# Modular Vision SMARC Module
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Wait sleep 1.0
#-----------------------------------------------------------------------------#
# CLEANUP #
#-----------------------------------------------------------------------------#
Touchtest_stop touchmon -t -r /touch_tst_socket -q
Fingerpaint_stop killall fingerpaint_sdl
#Testimage_display_stop killall bball_qml
#Testimage_display_stop killall qmlscene
Disable_24VOUT echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
Test_BT_stop killall l2pingd
Battery_Charger_disable gpioset $(gpiofind EN_CHARGER)=0
CIM_5V_OFF echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Bluetooth_stop for i in $(ps ax | grep "bluetooth_l2test_service.sh\|l2test" | grep -v "grep" | sed -e 's/ *\([0-9]\+\).*/\1/');do kill $i;done
Touchtest_stop touchmon -t -r /touch_tst_socket -q
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment