Add automated script to test devices against known testers. Tests performed: * echo test * extended echo test i.e. received byte value will be incremented * tester's register access Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
How To Run
Connect the DUT (device under test) UART6 to the BPT (bluepill tester). Information for BPT setup can be found here.
Example Test With Nucleo-F401RE
- Flash the periph_uart firmware on the nucleo-f401 with
make BOARD=nucleo-f401 flashin the periph_uart directory - Connect the BPT to the cpu using a USB to Serial converter
(BPT IF_TX = PA9)
(BPT IF_RX = PA10) - Connect the BPT to the DUT
(DUT RX/PA12 <=> BPT TX3/PB10)
(DUT TX/PA11 <=> BPT RX3/PB11) test.pyrequires the path to$RIOTBASE/dist/teststo be added toPYTHONPATHenvironment variable. Either modifyPYTHONPATHpermanently in the.bashrcor modify it temporary before invocation:
PYTHONPATH=$PYTHONPATH:$RIOTBASE/dist/tests python3 test.py- Run the
test.pyfrom theperiph_uart/testsdirectory (with various options)
python3 test.pyfor python 3
python3 test.py --log=DEBUGto see all debug messages
python3 test.py --dut_port="/dev/ttyACM0"to specify the port
python3 test.py --log=DEBUG --dut_port="/dev/ttyACM0" --dut_uart=6 --bpt_port="/dev/ttyACM1" > nucleo-f401_test.txtfor all the fix'ns
Flags
--log=DEBUG -> allows for debug output
--dut_port -> the port name of the DUT
--dut_uart -> DUT UART number to test
--bpt_port -> the port name of the BPT