Software Library

Benjamin Riggs edited this page Jan 28, 2019 · 4 revisions

AMMDK Software Library

AMM Application Software

Currently, while the standard is still in development, all AMM modules share the same repository and underlying codebase, available here. This is the code that communicate via DDS to other modules, including the Module Manager. As that codebase develops, it will be broken into a library.

AMMDK Firmware & Software Library

For modules built using the AMMDK hardware, there is an additional layer of code needed to communicate with the hardware peripherals attached to the boards. As illustrated in the AMMDK Overview, for a given AMMDK-based module, there are two different places that run AMM-specific code, the Module Application code, which runs in a Linux environment on the SoM, and the I/O Control code, which runs on the 'Tiny' microcontroller (MCU) and interfaces with actual hardware peripherals. The AMMDK Software Library allows these two codebases to communicate seamlessly with one another.


The AMMDK Software Library utilizes an SPI link between the SoM and the 'Tiny' MCU to synchronously pass data with relatively high throughput and low latency, certainly fast enough to be unnoticed by human faculties. The Library transmits via datagram packets while providing error correction and packet delivery guarantees. It also establishes the SPI link using the appropriate resource on the OS hosting the code.

On top of the datagram API, the AMMDK Software Library also provides a 'Remote Control' API for the AMM Application code (running in Linux on the SoM) that looks as if the Application code is controlling the I/O Controls directly. For the remote API to function, a specific firmware needs to be flashed onto the Tiny MCU, which is also provided.

Code Repositories

Common SPI Repo

Both the AMM Application code and the Tiny MCU code rely on the same underlying spi_proto library. Further documentation about usage and implementation is available in the Readme.

Tiny MCU Repo

The amm-tiny repo contains the code that runs on the Tiny MCU, with example code using the base datagram API as well as the code for the remote API. The repo also contains tools & instructions for flashing code onto the Tiny MCU and connecting to the Tiny MCU via gdb for debugging purposes. More detailed documentation about the remote API is available in amm-tiny/

AMM Application examples

The repo containing the AMM module application code contains examples using both the remote and datagram APIs. The remote API is leveraged heavily by the Fluid Manager code, while the datagram API is presented in a 'hello world' example of blinking an LED at the simulated heartbeat.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.