Skip to content

Figures

Every figure on this site is drawn by a Python module from facts extracted from the code, so it is rebuilt, not redrawn, when the code changes. CI runs kokeb-docs figures --check and fails when a committed figure no longer matches the code. Each figure below lists the files it is drawn from.

Inside the ADS9324

Block diagram of the ADS9324: its function blocks, how they connect and which package pins reach each block.Block diagram of the ADS9324: its function blocks, how they connect and which package pins reach each block.
Inside the ADS9324
Figure description and sources

The ADS9324's function blocks inside its outline. Arrows between blocks carry signals or data in the direction they point (both ways where they have two heads). The package pins stand on the left and right edges with their numbers, each wired to the block it reaches.

Drawn from: docs/hardware.yml; inc/ads9324.hpp; inc/ads9324_spi_interface.hpp.

Hardware description: docs/hardware.yml

Drawn from:

ADS9324: Typical application

Schematic of the ADS9324 typical application: the chip with U2 MCU, C1 capacitor 1 µF, C2 capacitor 0.1 µF, C3 capacitor 1 µF, C4 capacitor 0.1 µF, C5 capacitor 1 µF, C6 capacitor 0.1 µF, C7 capacitor 4.7 µF, C8 capacitor 1 µF, C9 capacitor 1 µF, R1 resistor 1 kΩ, R2 resistor 1 kΩ, C10 capacitor 10 nF; the MCU wires carry the port hooks GpioGet(CtrlPin::DrdyAlarm), GpioSet(CtrlPin::Convst), GpioSet(CtrlPin::Reset), Transfer().Schematic of the ADS9324 typical application: the chip with U2 MCU, C1 capacitor 1 µF, C2 capacitor 0.1 µF, C3 capacitor 1 µF, C4 capacitor 0.1 µF, C5 capacitor 1 µF, C6 capacitor 0.1 µF, C7 capacitor 4.7 µF, C8 capacitor 1 µF, C9 capacitor 1 µF, R1 resistor 1 kΩ, R2 resistor 1 kΩ, C10 capacitor 10 nF; the MCU wires carry the port hooks GpioGet(CtrlPin::DrdyAlarm), GpioSet(CtrlPin::Convst), GpioSet(CtrlPin::Reset), Transfer().
ADS9324: Typical application
Figure description and sources

A schematic. The MCU is on the left, each of its pins level with the chip pin it connects to; above each wire is the hook of the driver's port that drives or reads it. Supply pins point up to their supply and decoupling, ground pins down. Pins on the right carry the loads and the pins tied to a supply or ground; a cross marks a pin left open. A dot is a junction; wires that cross without a dot are not connected.

Drawn from: docs/hardware.yml; inc/ads9324.hpp; inc/ads9324_spi_interface.hpp.

Hardware description: docs/hardware.yml

Drawn from:

ADS9324 package, VQFN-64

Outline of the ADS9324 in VQFN-64 drawn to scale from above: body 8.0 x 8.0 x 1.0 mm, pitch 0.4 mm, 64 pins and an exposed pad.Outline of the ADS9324 in VQFN-64 drawn to scale from above: body 8.0 x 8.0 x 1.0 mm, pitch 0.4 mm, 64 pins and an exposed pad.
ADS9324 package, VQFN-64
Figure description and sources

The ADS9324 package seen from the top and, when the height is known, from the side, drawn to scale: 8.0 x 8.0 x 1.0 mm. The arrows carry the datasheet's dimensions, the dot marks pin 1 and the pads are numbered counter-clockwise from it, coloured by the pin's electrical type (legend below). Pads sit centred on each side at the stated pitch; the datasheet's land pattern is the reference for a board.

Drawn from: docs/hardware.yml; inc/ads9324.hpp; inc/ads9324_spi_interface.hpp.

Hardware description: docs/hardware.yml

Drawn from:

ADS9324 pinout, VQFN-64

Pinout of the ADS9324 in VQFN-64, top view: 64 pins and an exposed pad, each with its name, its electrical type as a colour and the driver hook that uses it.Pinout of the ADS9324 in VQFN-64, top view: 64 pins and an exposed pad, each with its name, its electrical type as a colour and the driver hook that uses it.
ADS9324 pinout, VQFN-64
Figure description and sources

The ADS9324 seen from the top, in its VQFN-64 package. Pin 1 is marked by the dot; the numbers run counter-clockwise from it. Each pad is coloured by the pin's electrical type (legend below). Next to it is the pin's name and, in mono, the hook of the driver's port that drives or reads it; a pin without a hook is not used by the driver. The dashed square is the exposed pad.

Drawn from: docs/hardware.yml; inc/ads9324.hpp; inc/ads9324_spi_interface.hpp.

Hardware description: docs/hardware.yml

Drawn from:

The layers, one of them yours

Layer diagram: your application calls the ADS9324 core, which sends register reads and writes through the SPI port contract to the port class you write, which drives the chip; the core and the contract are the same on every MCU.Layer diagram: your application calls the ADS9324 core, which sends register reads and writes through the SPI port contract to the port class you write, which drives the chip; the core and the contract are the same on every MCU.
The layers, one of them yours
Figure description and sources

Top to bottom, each arrow is a call. Your application calls one object, whose public calls are listed from the umbrella header in inc/. The core turns each call into register reads and writes and hands them to the port contract (the CRTP base in inc/*_interface.hpp), which forwards them, at compile time, to the hooks of the port class you write; your port moves the bytes on the bus. The notes on the right say which layers stay the same on every MCU and which one you write. A library without a port contract has only the first two layers.

Drawn from: inc/ads9324.hpp public calls; inc/ads9324_spi_interface.hpp SpiInterface; figure module docs/diagrams/figures/driver-layers.py.

Figure module: docs/diagrams/figures/driver-layers.py

Drawn from:

One call through the layers

One call through the layers: your code calls MeasureOnce(), the core exchanges frames with the chip through your port and returns the result to your code.One call through the layers: your code calls MeasureOnce(), the core exchanges frames with the chip through your port and returns the result to your code.
One call through the layers
Figure description and sources

Participants, left to right: Your code, ADS9324 and Your port. The steps run from top to bottom. Your code sends MeasureOnce() to ADS9324. ADS9324 sends GpioSet(Convst, ACTIVE) to Your port. ADS9324 sends GpioSet(Convst, INACTIVE) to Your port. A note over ADS9324 says: the falling edge samples all 16 channels. ADS9324 sends GpioGet(DrdyAlarm) or DelayUs(1.25 us) to Your port. ADS9324 sends Transfer(zeros, rx, N bytes) to Your port. Your port returns true, N bytes to ADS9324. A note over ADS9324 says: derandomize, DIAG, codes to microvolts. ADS9324 returns Result to Your code.

Drawn from: docs/model/one-call-through-the-layers.seq.yml.

Hardware description: docs/model/one-call-through-the-layers.seq.yml

Drawn from:

One register read on the SPI bus

A register read on the ADS9324 SPI bus: the host sends the read command inside one chip-select frame, then clocks out a second frame in which the chip returns the value on SDOUT.A register read on the ADS9324 SPI bus: the host sends the read command inside one chip-select frame, then clocks out a second frame in which the chip returns the value on SDOUT.
One register read on the SPI bus
Figure description and sources

Participants, left to right: Host and ADS9324. The steps run from top to bottom. Host sends CS low, 0x01 0xAA 0x01 (GEN_CFG1: read register 0xAA), CS high to ADS9324. Host sends CS low, 0x00 0x00 0x00 to ADS9324. ADS9324 returns ..., value[15:8], value[7:0] on SDOUT to Host. Host sends CS high to ADS9324.

Drawn from: docs/model/spi-register-read.seq.yml.

Hardware description: docs/model/spi-register-read.seq.yml

Drawn from: