1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/tests/periph_uart/tests
MrKevinWeiss 5b83137fd1 dist/tests/if_lib: Update to riot_pal
This removes all non-application based driver/devices and replaces with riot_pal.
riot_pal (riot protocol abstraction layer) can be installed with pip install riot_pal.
The purpose is ti simplify and modularize the interfaces and tests.
All tests using the if_lib interface are updated too.
2018-10-09 21:21:17 +02:00
..
periph_uart_if.py dist/tests/if_lib: Update to riot_pal 2018-10-09 21:21:17 +02:00
README.md doc: Add deprecation warnings for new repos 2018-08-25 10:34:32 +02:00
test.py dist/tests/if_lib: Update to riot_pal 2018-10-09 21:21:17 +02:00

deprecated: BPT is renamed to PHiLIP, more information found here

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

  1. Flash the periph_uart firmware on the nucleo-f401 with make BOARD=nucleo-f401 flash in the periph_uart directory
  2. Connect the BPT to the cpu using a USB to Serial converter
    (BPT IF_TX = PA9)
    (BPT IF_RX = PA10)
  3. Connect the BPT to the DUT
    (DUT RX/PA12 <=> BPT TX3/PB10)
    (DUT TX/PA11 <=> BPT RX3/PB11)
  4. test.py requires the path to $RIOTBASE/dist/tests to be added to PYTHONPATH environment variable. Either modify PYTHONPATH permanently in the .bashrc or modify it temporary before invocation:
    PYTHONPATH=$PYTHONPATH:$RIOTBASE/dist/tests python3 test.py
  5. Run the test.py from the periph_uart/tests directory (with various options)
    python3 test.py for python 3
    python3 test.py --log=DEBUG to 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.txt for 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