\item[trbflash] A specialized tool to write, read and verify Flash ROMs used
to boot FPGAs. Currently, MDC OEP and RICH ADCM are supported, Shower AddOn
and MDC AddOn will follow.
+ \item[trb\_i2c] A specialized tool to access the RICH ADCM I2C controller used
+for APV frontend card configuration. It is tailor made for APV preamp chips,
+but can be simply adjusted in VHDL to fully comply with a single I2C master.
+ \item[trbrichcmd] A specialized tool for RICH ADCM features. It allows
+reading the serial numbers of frontend card and backplanes, and controls
+the internal logic analyzer for ADC data.
\item[readout\_mdc] Simulates the CTS using a TRB by sending first a pseudo
timing trigger via slow control, then a LVL1 trigger and finally an IPU
readout request. Data is sent via UDP to an Eventbuilder. Primarily written
\paragraph*{watch \$float} ~\\
The watch option can be added to any command (depsite trbcmd and trbflash) to
execute the given command in an endless loop. The \verb|$float| value gives
-the period in seconds.
\ No newline at end of file
+the period in seconds.
+
+\section{trb\_i2c}
+
+trb\_i2c can only read or write one register with one 8bit value at a time.
+
+\noindent The following parameters are needed for access:
+
+\begin{description}
+ \item[trb\_address] TRBnet address of RICH ADCM to be accessed. Broadcast
+access is supported.
+ \item[chip] I2C bus address of the APV to be accessed. General call access
+is supported.
+ \item[register] register address inside the APV chip.
+ \item[value] only for write access: value to be written.
+\end{description}
+
+\noindent The APV I2C addresses are 0x20 -- 0x2f when being individually
+addressed (one ADCM connects to 15 APVs), or 0x3f when doing a general call
+access.
+
+\noindent APV register map can be found inside the APV manual.
+
+\noindent trb\_i2c usually is used once during configuration of the system to
+setup all APV internal registers. Please note that changing certain registers
+inside APV will make a new SYNC trigger mandatory to activate the changed
+settings. It is not recommended to play with that tool during beam.
+
+\subsection*{Reading data from APV}
+
+\paragraph*{trb\_i2c r 0x3000 0x20 0x05} ~\\
+This command reads register 0x01 from APV on I2C address 0x20 on ADCM module
+with TRBnet address 0x3000 (i.e. sector 0, most inner ADCM, APV FE number 0).\\
+This register shows the currently used LATENCY.
+
+\paragraph*{trb\_i2c r 0xfffb 0x3f 0x01} ~\\
+This command reads on all connected ADCMs (RICH broadcast) all connected APVs
+(I2C general call) the contents of register 0x01 (ERROR).\\
+Output is wired-and due to I2C bus signaling, so reading error bits from all
+APVs in a shot is not possible due to a design bug inside the APV.
+
+\subsection*{Writing data to APV}
+
+\paragraph*{trb\_i2c w 0xfffb 0x3f 0x04 11} ~\\
+This command sets the LATENCY of all APVs inside the RICH subsystem to 11.
+RICH broadcast and I2C general call is used.
+
+\section{trbrichcmd}
+
+To be written~$\ldots$
\ No newline at end of file