Hardware-set-ups

From Wiki at Neela Nurseries
Revision as of 19:42, 4 October 2022 by Ted (talk | contribs) (Add hardware set up description for testings serial port on Linux host with loopback cable.)
Jump to: navigation, search

(1) Rpi RP2040 DEV-18288 set up 2022 Q2:

On Rpi Sparkfun board, DEV-18288 have an LED connected from GPIO p0_7, through 22kOhm resistor to plus rail pin left of the USB-C connector.

   +---------+
   |        9|     ^^
   |        8|    //
   |        7|---|>|---/\/\/---+
   |        6|          22k    |   
   |        5|                 |
   |        4|                 |
   |        3|                 |
   |        2|                 |
   |3V3   GND|                 |
   |RST   GND|                 |
   |GDN    RX|                 |
+--|+      TX|                 |
|  +---------+                 |
|                              |
+------------------------------+



^ Serial port loopback test on Linux

In two terminal windows, programs `echo` and `cat` can be used to test a serial port connected to a loopback cable. This testing also effectively demonstrates the working of serial drivers under Linux. Works for USB-based FTDI cables which convert USB to a serial link. Works for the much older 16550 based serial port peripheral chips.

A third and precursor command, `stty` is also needed to configure given serial port for sane operation during these tests. A couple of options to `stty` utility disable a default echoing behavior on given serial port. Another option suppresses a conversion or handling of carriage return bytes, e.g. stops serial port driver at some level from converting CR to CRLF.

Invocation of stty is:


stty -F /dev/ttyUSB4 -echo -onlcr