How to free a NeTV2’s serial port before a test¶
You want to run a test that reads a NeTV2 design’s output on the Pi’s GPIO UART.
The login console holds that port open and eats or corrupts the design’s output. The device for each Pi model is in Serial device by Raspberry Pi model.
What you need¶
A NeTV2 wired as on NeTV2 wiring to a Raspberry Pi.
sudoon the Pi: the port is opened withsudo.
Steps¶
On the Pi, run
sudo systemctl stop 'serial-getty@*'to stop the serial login console.On a Raspberry Pi 5, run
pinctrl set 14 a4; pinctrl set 15 a4to restore the UART function of GPIO14 and GPIO15, which is ALT4 (TXD0/RXD0).On the Pi, run the UART test on your Pi model’s device, from UART test parameters. It loads the UART design over JTAG first.
/dev/ttyAMA0is the default:$ sudo fpgas-netv2-debug --port /dev/ttyAMA0 test uart
Check¶
The test reads the design’s output and ends without an error. What a correct run prints is waiting for a run: test-designs issue #249.
If it fails¶
What you see |
Likely cause |
Fix |
|---|---|---|
The design’s output is missing or corrupt |
The login console still holds the port |
Run step 1 again |
The output is still corrupt on the maker’s stock NeTV2 image |
A |
|
On a Raspberry Pi 5 the port is silent after step 1 |
Stopping the console drops the pin mux, so GPIO14 and GPIO15 are plain GPIO |
Run step 2 |
The test cannot open |
The GPIO UART there is the mini UART at |
Change the test’s |