[bootlin/training-materials updates] master: Boot time: hardware measurement updates (9cde07e3)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Oct 29 10:46:36 CEST 2021

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/9cde07e3f57790bca964eec9710b1244c666e25f


commit 9cde07e3f57790bca964eec9710b1244c666e25f
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Wed Apr 7 11:26:37 2021 +0200

    Boot time: hardware measurement updates
    - Stop using a 5V pull-up that could damage the BBB
    - Using a pull-up to a 3.3V power rail from the BBB
    - Clarify the connections
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


 lab-data/boot-time/arduino/stopwatch/stopwatch.ino |   4 +--
 .../boot-time-hardware-measurement.tex             |  28 ++++++++++-----------
 labs/boot-time-hardware-measurement/nano-final.fzz | Bin 5706 -> 60383 bytes
 labs/boot-time-hardware-measurement/nano-final.png | Bin 184349 -> 225874 bytes
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lab-data/boot-time/arduino/stopwatch/stopwatch.ino b/lab-data/boot-time/arduino/stopwatch/stopwatch.ino
index 31c56c5b..6f28b57e 100644
--- a/lab-data/boot-time/arduino/stopwatch/stopwatch.ino
+++ b/lab-data/boot-time/arduino/stopwatch/stopwatch.ino
@@ -48,8 +48,8 @@ void setup()
-  pinMode(reset, INPUT_PULLUP); // Can't declare pins as pull-down on atmega328p
-  pinMode(videoready, INPUT); // Can't set these as pull-ups as on the other side, BBB GPIO pins are not 5V tolerant
+  pinMode(reset, INPUT); // Actually pulled up with an external resistor
+  pinMode(videoready, INPUT); // Actually pulled down with an external resistor
 void loop() {
diff --git a/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex b/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex
index ffa155c7..12fc7d7e 100644
--- a/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex
+++ b/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex
@@ -129,21 +129,22 @@ get it. It's the only line connected to the pin.
 \subsection{Pull up or pull down?}
 We need to control the state of the pins we watch when they are not
+driven. That's particularly important for the \code{SYS_RESET} signal,
+as if it's left floating, it can reset the board or prevent it from
+booting at any time.
-For the \code{SYS_RESET} signal, we are lucky that the ATmega328p CPU
-pins can be configured as pull-up, so we just need to configure them
-in software without having to use our own resistors.
+The ATmega328p CPU pins could be configured as pull-up (with internal
+pull-up resistors), but we are not allowed to have a 5V level
+connected to our board, as the Beagle Bone Black is {\bf not 5V tolerant},
+as explicited in its manual.
-For our custom GPIO pin, there only one choice because we cannot use
-pull-up. If we used our own pull-up resistor on the Arduino side,
-we would have a 5V voltage level connected to our board, and the Beagle
-Bone Black is {\bf not 5V tolerant}, as explicited in its manual.
+So, we will use a pull-up resistor to keep it at 3.3V when not driven,
+connected to a 3.3V voltage rail from the Beagle Bone Black.
-Therefore, pull-down is our only option. We will keep our GPIO low
-by default, and drive it high, after displaying the first
-frame. As a consequence, as the Arduino Nano just supports pull-up for
-pins, we will have to use our own pull-down resistors.
+For our custom GPIO pin, we will keep it low by default, using
+a pull-down resistor (the ATmega328p CPU pins don't have internal
+pull-down resistors), and drive it high, after displaying the first
+video frame.
 Then which Arduino pins to connect to? As the Beagle Bone Black board
 has a 3.3V voltage level, it's best to use the Arduino's Analog pins to
@@ -152,8 +153,7 @@ small integer value for 0V, and about 700 (out of a 1024 maximum) for
 So, let's use Arduino pin \code{A0} for reset, and pin \code{A1} for the
-custom GPIO, adding a 1 Kohm pull-down resistor provided by your
+custom GPIO, and connect two 1 Kohm resistors provided by your instructor:
diff --git a/labs/boot-time-hardware-measurement/nano-final.fzz b/labs/boot-time-hardware-measurement/nano-final.fzz
index 78423d72..23c96cfa 100644
Binary files a/labs/boot-time-hardware-measurement/nano-final.fzz and b/labs/boot-time-hardware-measurement/nano-final.fzz differ
diff --git a/labs/boot-time-hardware-measurement/nano-final.png b/labs/boot-time-hardware-measurement/nano-final.png
index 542b229d..2c5e519f 100644
Binary files a/labs/boot-time-hardware-measurement/nano-final.png and b/labs/boot-time-hardware-measurement/nano-final.png differ

More information about the training-materials-updates mailing list