change tcbdefines to use optional args
This commit is contained in:
parent
d322311813
commit
c4b29b2caa
|
@ -104,7 +104,7 @@ The secondary plots confirm the
|
|||
|
||||
\section{after Calibration}
|
||||
|
||||
\minty{yaml}{./pitstop/pitdb.yaml}
|
||||
\minty[minted options={lastline=8}]{yaml}{./pitstop/pitdb.yaml}
|
||||
|
||||
\subsection{Voltages}
|
||||
|
||||
|
|
|
@ -1,20 +1,61 @@
|
|||
%! TEX root = ../thesis.tex
|
||||
\chapter{Results}
|
||||
|
||||
This Chapter summaizes all of the resulting Wokflow that has been developed during this Bachelor Thesis Work.
|
||||
This Chapter summaizes all of the resulting Workflow that has been developed during this Bachelor Thesis Work.
|
||||
Mainly the Firmware Changes compared to the state at wich it was left off after the previously taken Internship \cite{
|
||||
% TODO: insert ubib ref to Internship report
|
||||
}
|
||||
|
||||
\section{Firmware}
|
||||
|
||||
The PowerIt Firmware was updated to allow for the Calibration Procedure (described in \ref{calib}) and the Rgulation of its 1.8V output. That resulted in a new Version of the I2C Protocol between the Monitoring System and PowerIts.
|
||||
|
||||
\subsection{PI2CProto v2}
|
||||
The new Commmunication protocoll is based on the old one, and while the from the Host send Commands are compatible with version 1 the returned Message is not.
|
||||
And just like in the old Version a Master can send a message to the PowerIt with the in the \verb|command_t| struct described structure:
|
||||
|
||||
\begin{mintylst}{cpp}
|
||||
pi2c::command_t tosend { <crc>, 2, <CMD>, <optional_data0>, <optional_data1> };
|
||||
\end{mintylst}
|
||||
|
||||
Here the \verb|<CMD>| can be \verb|CMD_SET| for setting a value in the corresponding table (fig. \ref{registerbuffer}), using \verb|<optional_data0>| as address and \verb|<optional_data1>| as value.
|
||||
|
||||
Reading a number of bytes from the table can be accomplished with \verb|CMD_READ|, giving the address to start and number of bytes in that order.
|
||||
|
||||
While reading the complete Table is done with the \verb|CMD_READALL| command.
|
||||
|
||||
THe \verb|<crc>| byte is the CRC8 value of all following bytes inside \verb|command_t|
|
||||
|
||||
\subsection{I2C mapped Register-Table}
|
||||
When sending or reading values to or from the PowerIt, the address requireed is one of the 152 bytes documented in this table.
|
||||
\input{./tabs/registerbuffer}
|
||||
|
||||
\section{Calibration}
|
||||
\section{Calibration\label{calib}}
|
||||
|
||||
One of the goals of this Bachelor Thesis is to provide anyone required to calibrate a PowerIt Board with a comprehensive guide of, and inside into this process.
|
||||
|
||||
\subsection{Calibration-Table}
|
||||
|
||||
Of important note is that al calibration values of each PowerIt can be mapped via the naming and uuid scheme provided either by the corresponding stickers or the STM32-Chips internal uuid (accessible through address \verb|0x8c|, see figure \ref{registerbuffer}).
|
||||
There now also exists a global calibration Database, which will be loaded by the system on startup.
|
||||
|
||||
An example entry for each PowerIt entry looks like figure \ref{pitdb-example}
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{mintyfig}[title={example entry of pitdb.yaml}, label=pitdb-example]{yaml}
|
||||
---
|
||||
uuid: 'default'
|
||||
name: 'Bxx'
|
||||
poly18i: [-3.0, 25.0, 0.0]
|
||||
poly48i: [0.0, 227.27, 0.0]
|
||||
poly10v: [0.0, 4.0, 0.0]
|
||||
poly18v: [0.0, 1.0, 0.0]
|
||||
poly48v: [0.0, 27.386, 0.0]
|
||||
|
||||
\end{mintyfig}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\subsection{How to calibrate a PowerIt Board}
|
||||
|
||||
The Calibration process is based on the PItSTOP Python scripts\footnote{
|
||||
|
@ -35,10 +76,12 @@ Using the script any one of the following Values can be tested and calibrated:
|
|||
\subsubsection{Setting up the Test Environment}
|
||||
The simplest way to setup your environment consists of cloning the PItSTOP Project onto your Client:
|
||||
\begin{mintylst}{bash}
|
||||
|
||||
$ git clone https://url.to.pitstop
|
||||
|
||||
\end{mintylst}
|
||||
then substituting the \verb|rsync| target:
|
||||
\begin{mintylst}[makefile]{makefile}
|
||||
\begin{mintylst}[label={makefile}]{makefile}
|
||||
all:
|
||||
rsync --progress ./*.py /remote.url/
|
||||
\end{mintylst}
|
||||
|
|
17
preamble.tex
17
preamble.tex
|
@ -19,7 +19,7 @@
|
|||
minted language=#2,
|
||||
minted style=pastie,
|
||||
listing file={#3},
|
||||
title={#1}
|
||||
#1
|
||||
}
|
||||
|
||||
\newtcblisting{mintylst}[2][]{%
|
||||
|
@ -31,8 +31,21 @@
|
|||
listing only,
|
||||
minted language=#2,
|
||||
minted style=pastie,
|
||||
title={#1}
|
||||
#1
|
||||
}
|
||||
|
||||
\newtcblisting[blend into=figures]{mintyfig}[2][]{%
|
||||
enhanced,
|
||||
listing engine=minted,
|
||||
colback=mintedbg,
|
||||
colframe=myteal,
|
||||
boxrule=.25mm,
|
||||
listing only,
|
||||
minted language=#2,
|
||||
minted style=pastie,
|
||||
#1
|
||||
}
|
||||
|
||||
\usepackage{enumitem,amssymb}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{graphicx}
|
||||
|
|
|
@ -16,26 +16,27 @@
|
|||
0x36 & polyFit.I18 & float arr & 12 & rw\\
|
||||
0x42 & polyFit.T & float arr & 12 & rw\\
|
||||
\hline
|
||||
0x42 & sampleTicks & byte & 1 & rw\\
|
||||
0x4e & sampleTicks & byte & 1 & rw\\
|
||||
\hline
|
||||
0x43 & TEMP\_SENSOR & float & 4 & r\\
|
||||
0x47 & EXT\_AIN & float & 4 & r\\
|
||||
0x4b & MONITOR\_48V & float & 4 & r\\
|
||||
0x4f & MONITOR\_48I & float & 4 & r\\
|
||||
0x53 & MONITOR\_8VBUS & float & 4 & r\\
|
||||
0x57 & MONITOR\_8IBUS & float & 4 & r\\
|
||||
0x5b & MONITOR\_8V\_0 & float & 4 & r\\
|
||||
0x5f & MONITOR\_8V\_1 & float & 4 & r\\
|
||||
0x63 & MONITOR\_8V\_2 & float & 4 & r\\
|
||||
0x67 & MONITOR\_8V\_3 & float & 4 & r\\
|
||||
0x6b & VDD\_1V8\_ANA & float & 4 & r\\
|
||||
0x6f & VDD\_1V8\_IOUT\_ANA & float & 4 & r\\
|
||||
0x73 & VDD\_1V8\_DIGI & float & 4 & r\\
|
||||
0x77 & VDD\_1V8\_IOUT\_DIGI & float & 4 & r\\
|
||||
0x4f & TEMP\_SENSOR & float & 4 & r\\
|
||||
0x53 & EXT\_AIN & float & 4 & r\\
|
||||
0x57 & MONITOR\_48V & float & 4 & r\\
|
||||
0x5b & MONITOR\_48I & float & 4 & r\\
|
||||
0x5f & MONITOR\_8VBUS & float & 4 & r\\
|
||||
0x63 & MONITOR\_8IBUS & float & 4 & r\\
|
||||
0x67 & MONITOR\_8V\_0 & float & 4 & r\\
|
||||
0x6b & MONITOR\_8V\_1 & float & 4 & r\\
|
||||
0x6f & MONITOR\_8V\_2 & float & 4 & r\\
|
||||
0x73 & MONITOR\_8V\_3 & float & 4 & r\\
|
||||
0x77 & VDD\_1V8\_ANA & float & 4 & r\\
|
||||
0x7b & VDD\_1V8\_IOUT\_ANA & float & 4 & r\\
|
||||
0x7f & VDD\_1V8\_DIGI & float & 4 & r\\
|
||||
0x83 & VDD\_1V8\_IOUT\_DIGI & float & 4 & r\\
|
||||
\hline
|
||||
0x7b & CommitHash & float & 4 & s\\
|
||||
0x7f & CommitDirtyFlag & byte & 1 & s\\
|
||||
0x80 & STM32UUID & 96bit & 12 & s\\
|
||||
0x87 & CommitHash & float & 4 & s\\
|
||||
0x8b & CommitDirtyFlag & byte & 1 & s\\
|
||||
0x8c & STM32UUID & 96bit & 12 & s\\
|
||||
\end{tabular}
|
||||
\caption{memory mapping of the packed struct moved over i2c}
|
||||
\label{registerbuffer}
|
||||
\end{figure}
|
||||
|
|
Loading…
Reference in New Issue