[FE training-materials-updates] kernel labs: clarify serial pin connecting instructions
Michael Opdenacker
michael.opdenacker at free-electrons.com
Thu Oct 3 16:33:13 CEST 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : kernel-ng
Link : http://git.free-electrons.com/training-materials/commit/?id=a009a595745b448e1cd35a9bbc533aecc8fab36d
>---------------------------------------------------------------
commit a009a595745b448e1cd35a9bbc533aecc8fab36d
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Thu Oct 3 16:29:55 2013 +0200
kernel labs: clarify serial pin connecting instructions
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
a009a595745b448e1cd35a9bbc533aecc8fab36d
labs/kernel-board-setup/kernel-board-setup.tex | 9 +++++++--
labs/kernel-serial-iomem/kernel-serial-iomem.tex | 12 ++++++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/labs/kernel-board-setup/kernel-board-setup.tex b/labs/kernel-board-setup/kernel-board-setup.tex
index d562c9b..29ee245 100644
--- a/labs/kernel-board-setup/kernel-board-setup.tex
+++ b/labs/kernel-board-setup/kernel-board-setup.tex
@@ -40,12 +40,17 @@ Don't hesitate to share your questions with the instructor.
The Beaglebone serial connector is exported on the 6 pins close to one
of the 48 pins headers. Using your special USB to Serial adaptor provided
by your instructor, connect the ground wire (blue) to the pin closest
-to the power supply connector (let's call it pin 1), and the TX (red)
-and RX (green) wires to the pins 4 and 5.
+to the power supply connector (let's call it pin 1), and the \code{TX} (red)
+and \code{RX} (green) wires to the pins 4 (\code{RX}) and 5 (\code{TX}).
+
\footnote{See
\url{https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/}
for details about the USB to Serial adaptor that we are using.}
+You always should make sure that you connect the \code{TX} pin of the cable
+to the \code{RX} pin of the board, and vice versa, whatever the board and
+cables that you use.
+
Once the USB to Serial connector is plugged in, a new serial port
should appear: \code{/dev/ttyUSB0}. You can also see this device
appear by looking at the output of \code{dmesg}.
diff --git a/labs/kernel-serial-iomem/kernel-serial-iomem.tex b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
index 440ca65..192ed20 100644
--- a/labs/kernel-serial-iomem/kernel-serial-iomem.tex
+++ b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
@@ -40,10 +40,13 @@ as for the cable that you're using for the console:
\begin{itemize}
\item The blue wire should be connected \code{GND}
-\item The red wire should be connected to \code{TX}
-\item The green wire should be connected to \code{RX}
+\item The red wire (\code{TX}) should be connected to the board's \code{RX} pin
+\item The green wire (\code{RX}) should be connected to the board's \code{TX} pin
\end{itemize}
+You can (or even should) show your connections to the instructor
+to make sure that you haven't swapped the \code{RX} and \code{TX} pins.
+
Now, open the \code{arch/arm/boot/dts/am335x-bone-common.dtsi}
file and create declarations for UART2 and UART4 in the pin muxing
section:
@@ -71,6 +74,10 @@ Then, declare the corresponding devices:
\begin{verbatim}
uartfe2: feserial at 48024000 {
compatible = "free-electrons,serial";
+ ti,hwmods = "uart3";
+ /* Tell the OMAP harware power management that the block
+ must be enabled, otherwise it's switched off
+ Caution: starting counting at 1, not 0 */
clock-frequency = <48000000>;
reg = <0x48024000 0x2000>;
interrupts = <74>;
@@ -81,6 +88,7 @@ Then, declare the corresponding devices:
uartfe4: feserial at 481a8000 {
compatible = "free-electrons,serial";
+ ti,hwmods = "uart5";
clock-frequency = <48000000>;
reg = <0x481a8000 0x2000>;
interrupts = <45>;
More information about the training-materials-updates
mailing list