IMX500 MCU SDK
API reference for the Arducam IMX500 MCU SDK
Loading...
Searching...
No Matches
IMX500 MCU SDK API Overview

The IMX500 MCU SDK exposes C/C++ interfaces for binding platform drivers, starting the module, selecting MIPI and SPI output, reading inference metadata, managing model assets, and tuning the sensor.

This page follows the declarations currently exposed by the public headers. Platform quick starts are maintained in README.md; integration details live under docs/.

Public Header Files

  • ArducamIMX500SDK.h contains the module, stream, metadata, model-management, data-injection, ROI, and sensor-tuning interfaces.
  • ai_driver.h contains the platform callback types and registration functions required by the SDK.

Names beginning with an underscore and the SDK's global driver/cache variables are implementation details. They are intentionally excluded from the generated public API reference.

Interface Categories

Platform Binding

Register these callbacks before probing or opening the module:

The I2C driver also supplies the millisecond and microsecond delay callbacks used by module operations. The logger is optional.

Module Lifecycle and Streaming

imx500_open selects one of two model-loading paths. A non-null model with a non-zero size uses direct SPI loading and requires the matching network-info blob. A null or empty model requests model and network-info loading from module flash.

Metadata and Tensor Parsing

Call get_metadata_size before allocating or selecting a receive buffer. After read_metadata returns a non-zero byte count, pass that exact count and the same spi_data_format_t selected by imx500_open to parse_metadata.

Model and Network Assets

SPI asset operations:

I2C payload asset operations:

Host-side network-info cache:

Model and network-info blobs must be a matching pair. The transport-specific functions above do not replace the platform callback registration step.

Data Injection

Use the streaming variant when the complete input cannot be held in one host buffer. Set first_time for the first frame in an injection session and call stop_data_injection when the session ends.

ROI and Coordinate Mapping

Crop rectangles use absolute sensor coordinates and the half-open form [xmin, xmax), [ymin, ymax).

ISP and Sensor Tuning

The setters stage a configuration. Call the corresponding apply function to send the staged settings to the sensor.

Low-Level Sensor Register Access

These functions bypass the higher-level configuration helpers. Use them only when the target register and value width are known.

Supported Stream Formats

All four values in mipi_data_format_t are handled by the current imx500_open implementation.

The current imx500_open implementation configures these SPI modes:

The remaining spi_data_format_t values are reserved by the interface but are not currently enabled by imx500_open. Select a configured mode before calling read_metadata or parse_metadata.

Key Data Types

Typical Inference Sequence

  1. Register platform callbacks with register_i2c_driver and register_spi_driver.
  2. Optionally register logging with register_printf.
  3. Optionally verify connectivity with probe_imx500_module.
  4. Initialize the model and stream formats with imx500_open.
  5. Start output with stream_on.
  6. Poll get_metadata_size until a non-zero frame size is available.
  7. Read that frame with read_metadata.
  8. Decode it with parse_metadata using the selected SPI format.

stream_on() reports command failures through the registered logger because its current C API return type is void. Treat a subsequent metadata timeout as a stream-start failure and include the SDK log in diagnostics.