Skip to main content
The ANX dev module exposes five hardware peripheral interfaces — UART, I2C, SPI, ADC, and PWM — all accessible through the ANX SDK’s C API. Each interface is backed by dedicated hardware in the microcontroller, meaning they operate independently and can run concurrently without blocking each other. The examples below show the minimal configuration required to initialise each peripheral and perform a basic operation; swap in your own pin assignments, speeds, and device addresses as your design requires.
The code examples on this page show the most common configuration for each peripheral. For the complete list of configuration fields, return values, error codes, and advanced options such as DMA transfers and interrupt callbacks, refer to the ANX SDK API Reference included with your SDK installation or available in the developer portal.

UART

The ANX dev module provides two independent hardware UART ports. UART0 is mapped to GPIO0 (TX) and GPIO1 (RX) on the P1 header and is also used for serial logging during development. UART1 is mapped to GPIO30 (TX) and GPIO31 (RX) on the P2 header and is available for communicating with external devices such as GPS modules, GSM modems, or other microcontrollers.Both ports default to 115200 baud and support standard frame formats from 5 to 8 data bits, 1 or 2 stop bits, and none, even, or odd parity. Hardware flow control (RTS/CTS) is available on UART0.
If you use UART0 for application data, redirect the SDK’s debug log output to UART1 by calling anx_log_set_port(ANX_UART1) during initialisation to avoid mixing log messages with your data stream.