You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
tbm-docs/user-doc/user-doc.tex

137 lines
5.4 KiB

\documentclass[twoside,a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage[margin=2cm,includefoot,footskip=1.5cm]{geometry}
\usepackage{graphicx}
\usepackage{minted}
\usepackage{tikz}
\usepackage{url}
\usetikzlibrary{calc, shapes.misc}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%\setmainfont[BoldFont=OpenSans-Bold, ItalicFont=OpenSans-Italic, Ligatures=TeX]{OpenSans-Regular.ttf}
%\setsansfont[BoldFont=OpenSans-Bold, ItalicFont=OpenSans-Italic, Ligatures=TeX]{OpenSans-Regular.ttf}
\newfontfamily\Roboto[BoldFont=Roboto-Bold, Ligatures=TeX]{Roboto-Regular.ttf}
\setmainfont[BoldFont=Roboto-Bold, ItalicFont=Roboto-Italic, Ligatures=TeX]{Roboto-Regular.ttf}
\setsansfont[BoldFont=Roboto-Bold, ItalicFont=Roboto-Italic, Ligatures=TeX]{Roboto-Regular.ttf}
\definecolor{background}{RGB}{58,46,86}
\definecolor{border}{RGB}{234,211,186}
\patchcmd{\section}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{%
\begin{tikzpicture}[overlay, remember picture]%
\fill[border] (current page.north west) rectangle ($(current page.north east)+(0,-1.5cm)$);
\fill[background] (current page.north west) rectangle ($(current page.north east)+(0,-1.4cm)$);
\node[anchor=north west, text=white, font=\Large\Roboto, minimum size=1.4cm, inner xsep=5mm] at (current page.north west) {\textbf{white}box};
\end{tikzpicture}
}
\fancyfoot[LE,RO]{\thepage}
\newcommand\fancytitlecover {
\begin{tikzpicture}[remember picture, overlay, shorten >= -10pt]
\fill[border] (current page.north west) rectangle (current page.south east);
\fill[background] (current page.north west) rectangle ($(current page.south east)+(0,3mm)$);
\end{tikzpicture}
}
\makeatletter
\renewcommand*{\maketitle}{
\begin{titlepage}
\fancytitlecover
\color{white}
\begin{center}
\sffamily
\vspace*{3cm}
\huge \@title \\[1em]
{\Large\Roboto \textbf{white}box}
\vfill
%\large \@author \\[1em]
%\large \@date
\end{center}
\end{titlepage}
}
\makeatother
\begin{document}
\title{Trusted Boot Module \\[.5em]
\Large User Manual}
\author{}
\date{}
\maketitle
\tableofcontents
\newpage
\section{Introduction}
\section{Flashing}
\begin{figure}[H]
\centering
\begin{tikzpicture}
% Draw the chip.
\node[draw=black,chamfered rectangle,align=center,fill=gray!10,minimum width=3.5cm,minimum height=3cm] (chip) {Winbond \\ W25Q128.V};
\node[draw=black,fill=gray!30,circle] at ($(chip.south west) + (.3,.3)$) {};
% Draw the pin-out at the bottom.
\path[draw] ($(chip.south)+(-1.2,0)$) -- ($(chip.south)+(-1.2,-.5)$) node[below] {CS};
\path[draw] ($(chip.south)+(-.4,0)$) -- ($(chip.south)+(-.4,-.5)$) node[below] {DO};
\path[draw] ($(chip.south)+(.4,0)$) -- ($(chip.south)+(.4,-.5)$) node[below] {WP};
\path[draw] ($(chip.south)+(1.2,0)$) -- ($(chip.south)+(1.2,-.5)$) node[below] {GND};
% Draw the pin-out at the top.
\path[draw] ($(chip.north)+(-1.2,0)$) -- ($(chip.north)+(-1.2,.5)$) node[above] {VCC};
\path[draw] ($(chip.north)+(-.4,0)$) -- ($(chip.north)+(-.4,.5)$) node[above] {H/R};
\path[draw] ($(chip.north)+(.4,0)$) -- ($(chip.north)+(.4,.5)$) node[above] {CLK};
\path[draw] ($(chip.north)+(1.2,0)$) -- ($(chip.north)+(1.2,.5)$) node[above] {DI};
\end{tikzpicture}
\caption{the pin-out of the Winbond W25Q128.V SPI NOR flash}
\end{figure}
\begin{figure}[H]
\centering
\begin{tikzpicture}
% Draw the chip.
\node[draw=black,chamfered rectangle,align=center,fill=gray!10,minimum width=3.5cm,minimum height=3cm] (chip) {Winbond \\ W25Q128.V};
\node[draw=black,fill=gray!30,circle] at ($(chip.south west) + (.3,.3)$) {};
% Draw the pin-out at the bottom.
\path[line width=1.5mm,draw=black] ($(chip.south)+(-1.2,0)$) -- ($(chip.south)+(-1.2,-.7)$);
\path[line width=1.2mm,draw=white] ($(chip.south)+(-1.2,0)$) -- ($(chip.south)+(-1.2,-.7)$) node[below] {CS};
\path[line width=1.5mm,draw=black] ($(chip.south)+(-.4,0)$) -- ($(chip.south)+(-.4,-.7)$);
\path[line width=1.2mm,draw=black] ($(chip.south)+(-.4,0)$) -- ($(chip.south)+(-.4,-.7)$) node[below] {DO};
\path[line width=1.5mm,draw=black] ($(chip.south)+(.4,0)$) -- ($(chip.south)+(.4,-.7)$);
\path[line width=1.2mm,draw=brown] ($(chip.south)+(.4,0)$) -- ($(chip.south)+(.4,-.7)$) node[below] {WP};
\path[line width=1.5mm,draw=black] ($(chip.south)+(1.2,0)$) -- ($(chip.south)+(1.2,-.7)$);
\path[line width=1.2mm,draw=brown] ($(chip.south)+(1.2,0)$) -- ($(chip.south)+(1.2,-.7)$) node[below] {GND};
% Draw the pin-out at the top.
\path[line width=1.5mm,draw=black] ($(chip.north)+(-1.2,0)$) -- ($(chip.north)+(-1.2,.7)$);
\path[line width=1.2mm,draw=orange] ($(chip.north)+(-1.2,0)$) -- ($(chip.north)+(-1.2,.7)$) node[above] {VCC};
\path[line width=1.5mm,draw=black] ($(chip.north)+(-.4,0)$) -- ($(chip.north)+(-.4,.7)$);
\path[line width=1.2mm,draw=orange] ($(chip.north)+(-.4,0)$) -- ($(chip.north)+(-.4,.7)$) node[above] {H/R};
\path[line width=1.5mm,draw=black] ($(chip.north)+(.4,0)$) -- ($(chip.north)+(.4,.7)$);
\path[line width=1.2mm,draw=purple] ($(chip.north)+(.4,0)$) -- ($(chip.north)+(.4,.7)$) node[above] {CLK};
\path[line width=1.5mm,draw=black] ($(chip.north)+(1.2,0)$) -- ($(chip.north)+(1.2,.7)$);
\path[line width=1.2mm,draw=gray] ($(chip.north)+(1.2,0)$) -- ($(chip.north)+(1.2,.7)$) node[above] {DI};
\end{tikzpicture}
\caption{connecting the BusPirate 3.6 with the SPI NOR Flash}
\end{figure}
\end{document}