62 lines
2.3 KiB
TeX
62 lines
2.3 KiB
TeX
%! TEX root = ../thesis.tex
|
|
\chapter{Appendix - Firmware}
|
|
\section{Virtual Memory Mapping}
|
|
The biggest change done to the firmware was the implementation of a new communication protocol.
|
|
|
|
\input{./tabs/registerbuffer}
|
|
This protocol uses the table from \autoref{registerbuffer} as reference.
|
|
|
|
\section{How to calibrate a PowerIt Board}
|
|
|
|
The calibration process is based on the PItSTOP python scripts.
|
|
These are split into \verb|server| and \verb|aggregator|. While the server is handling the translation between raw I$^2$C data, and the JSON formatted result, the aggregator takes this JSON and calculates a calibration.
|
|
|
|
Using the script any one of the following values can be tested and calibrated:
|
|
\begin{itemize}
|
|
\item input voltage (\verb|pitstop.Aggregator.test_v_48()|)
|
|
\item input current (\verb|pitstop.Aggregator.test_i_48()|)
|
|
\item 9.6V output voltage (\verb|pitstop.Aggregator.test_v_10()|)
|
|
\item 1.8V output voltage (\verb|pitstop.Aggregator.test_v_18()|)
|
|
\item 1.8V output current (\verb|pitstop.Aggregator.test_i_18()|)
|
|
\end{itemize}
|
|
|
|
\subsection{Setting up the Test Environment}
|
|
The simplest way to setup an environment consists of cloning the PItSTOP project on a client:
|
|
\begin{mintylst}{bash}
|
|
|
|
> git clone ssh://git@gitviz.kip.uni-heidelberg.de/sw-stm32.git
|
|
|
|
\end{mintylst}
|
|
then substituting the \verb|rsync| target:
|
|
\begin{mintylst}[label={makefile}]{makefile}
|
|
all:
|
|
rsync --progress ./*.py /remote.url/
|
|
\end{mintylst}
|
|
|
|
, to be your server (should be a RaspberryPi connected to the PowerIt)
|
|
|
|
\subsection{Running a Test}
|
|
Running the test requires the following commands
|
|
\\
|
|
serverside:
|
|
\begin{mintylst}{bash}
|
|
> python server.py
|
|
\end{mintylst}~\\
|
|
clientside:
|
|
\begin{mintylst}{bash}
|
|
> python aggregator.py
|
|
\end{mintylst}~\\
|
|
Now just following the instructions given, the selected test can be run:
|
|
\begin{mintylst}{text}
|
|
Setting up calibration test for {}
|
|
Please be sure to:
|
|
- connect the {} to the RaspberryPi running server.py.
|
|
- connect the PowerIt to the RaspberryPi as described in the documentation
|
|
- and be sure to connect the {} to the {} Terminal.
|
|
|
|
Continue (y/N): y
|
|
|
|
What is the Name given to the connected PowerIt? [Bxx]: B05
|
|
\end{mintylst}~\\
|
|
The result will consist of two diagrams one without calibration and one with.
|
|
It will also write the newly obtained calibration data into \verb|pitdb.yaml| |