Difference between revisions of "RK Platform Fast Test"
Yunjin.jiang (talk | contribs) |
Yunjin.jiang (talk | contribs) |
||
Line 97: | Line 97: | ||
<span style="color:#00ff00;">[ OK ]</span>: gpio-test 88 89 Test Pass | <span style="color:#00ff00;">[ OK ]</span>: gpio-test 88 89 Test Pass | ||
+ | |||
== UART == | == UART == | ||
+ | |||
+ | UART may support RS232 or RS485 mode, we use env "uart_mode" to change mode in RUNTIME. | ||
+ | |||
+ | We test RS232 in one port self-loop mode, RS485 in two port loop mode. | ||
+ | |||
+ | | ||
+ | |||
+ | === Preparation === | ||
+ | |||
+ | *To get UART information(RS232 or RS485; 4-wire or 2-wire; Software Port Number etc) from WIKI or User Mamual | ||
+ | *Run the following command on DUT Terminal、ADB or Debug console to check env setting | ||
+ | <pre> | ||
+ | fw_printenv uart_mode | ||
+ | |||
+ | # RS232: You will get the following information | ||
+ | # Error: "uart_mode" not defined | ||
+ | # uart_mode=0x00 | ||
+ | |||
+ | # RS485: You will get the following information | ||
+ | # uart_mode=0x0c | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | *To test RS232 mode, short TX to RX (PIN2 to PIN3 DB9) and CTS to RTS (PIN7 to PIN8 DB9) | ||
+ | |||
+ | === RS232 Mode Testing === | ||
+ | |||
+ | For example: | ||
+ | |||
+ | To test /dev/ttyS0 | ||
+ | |||
+ | Run the following command on DUT Terminal、ADB or Debug console: | ||
+ | |||
+ | 4-wire | ||
+ | <pre> | ||
+ | |||
+ | /tools/test/adv/uart/serial_test /dev/ttyS0 115200 h 10 2 | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | 2-wire | ||
+ | <pre> | ||
+ | |||
+ | /tools/test/adv/uart/serial_test /dev/ttyS0 115200 n 10 2 | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | === Result === | ||
+ | |||
+ | 1. Failure | ||
+ | |||
+ | /dev/ttyS0 Test Fail | ||
+ | |||
+ | 2. Success | ||
+ | |||
+ | /dev/ttyS0 Test Pass | ||
== CAN == | == CAN == |
Revision as of 09:26, 26 May 2023
Preface
When sending samples to customer or test team (Lab、DQA etc) or releasing images, we need test all functions.
All functions are classified to three types:
- Full-automatic Test
- Semi-automatic Test
- Manual Test
Full-Automatic Test
Run test script and get the result automatically.
Support to test the following items:
- AIM Linux Applications
- AIM Linux Services
- AIM Timers
- Thermal
- NPU
- GPU
- VPU
- eMMC
- RTC
Preparation
- Insert network cable to DUT
- Open browser on DUT, then input "172.21.128.237"
- Login your account to connect to internet
Testing
Run the following command on DUT Terminal、ADB or Debug console:
/tools/test/adv/auto_test/auto_test.sh
Result
1. Failure
[ Failed ]: docker run hello-world; Please check net connection, or docker
2. Success
[ OK ]: docker run hello-world
Semi-Automatic Test
GPIO
Test script need two GPIOs, set one GPIO to output and the other to input.
Then set the output to 1, read whether the input is 1.
Then set the output to 0, read whether the input is 0.
Preparation
- To get GPIO number from WIKI or User Mamual
- Short two GPIOs your want to test
[ Note ]
DB5901、DB2510 GPIOs have multi-functions, change to GPIO mode.
Testing
For example:
To test ROM-5880's GPIO0 and GPIO1
Run the following command on DUT Terminal、ADB or Debug console:
/tools/test/adv/gpio/gpio_test.sh 88 89
Result
1. Failure
[ Failed ]: gpio-test 88 89 Test Fail
2. Success
[ OK ]: gpio-test 88 89 Test Pass
UART
UART may support RS232 or RS485 mode, we use env "uart_mode" to change mode in RUNTIME.
We test RS232 in one port self-loop mode, RS485 in two port loop mode.
Preparation
- To get UART information(RS232 or RS485; 4-wire or 2-wire; Software Port Number etc) from WIKI or User Mamual
- Run the following command on DUT Terminal、ADB or Debug console to check env setting
fw_printenv uart_mode # RS232: You will get the following information # Error: "uart_mode" not defined # uart_mode=0x00 # RS485: You will get the following information # uart_mode=0x0c
- To test RS232 mode, short TX to RX (PIN2 to PIN3 DB9) and CTS to RTS (PIN7 to PIN8 DB9)
RS232 Mode Testing
For example:
To test /dev/ttyS0
Run the following command on DUT Terminal、ADB or Debug console:
4-wire
/tools/test/adv/uart/serial_test /dev/ttyS0 115200 h 10 2
2-wire
/tools/test/adv/uart/serial_test /dev/ttyS0 115200 n 10 2
Result
1. Failure
/dev/ttyS0 Test Fail
2. Success
/dev/ttyS0 Test Pass
CAN
Test script need two CANs, set one CAN as sender and the other as receiver.
Then send "123#55" from the sender, check whether the receiver get the same data.
Preparation
- Short CAN0's CAN_L (PIN2 DB9) to CAN1's CAN_L (PIN2 DB9)
- Short CAN0's CAN_H (PIN7 DB9) to CAN1's CAN_H (PIN7 DB9)
Testing
Run the following command on DUT Terminal、ADB or Debug console:
can0 is receiver, can1 is sender
/tools/test/adv/can/can_test.sh can0 can1
can1 is receiver, can0 is sender
/tools/test/adv/can/can_test.sh can1 can0
Result
1. Failure
[ Failed ]: canbus Test Fail
2. Success
[ OK ]: canbus Test Pass
I2C PIN Header
SPI PIN Header
Manual Test
SD Card
SATA
PCIE
USB
watchdog
lan
wlan
bluetooth
4G/5G
Audio
Camera
Display
SW reboot
Reboot Button
Power Button