Wiki

This version (27 Sep 2022 17:21) was approved by Darius B.The Previously approved version (08 Sep 2022 15:29) is available.Diff

Evaluating the MAX11205

Supported Evaluation Boards

MAX11205PMB1 Overview

The MAX11205PMB1 peripheral module provides the necessary hardware to interface the MAX11205 16-bit ADC to any system that utilizes Pmod™-compatible expansion ports configurable for GPIO interface. The IC is an ultra-low-power (< 300µA max active current), high-resolution, serial-output ADC. This device provides the highest resolution per unit power in the industry and is optimized for applications that require very high dynamic range with low power, such as sensors on a 4mA to 20mA industrial control loop. The voltage reference for the IC is supplied by a MAX6037 (2.5V) that is also on the module. The filtered power-supply voltage from the host can be optionally passed (jumper selectable) through a MAX8510 ultra-low-noise LDO, allowing empirical evaluation of performance with different power sources.

Hardware Specifications

Power Supply Requirements

The MAX11205PMB1 board has to be supplied with a voltage between 1.7V and +3.6V . If using directly with a PMOD connector, the host board should be capable of providing the 3.3V supply.

Digital Interface (PMOD)

The PMOD interface is a series of standardized digital interfaces for various digital communication protocols such as SPI, I2C, and UART. These interface types were standardized by Digilent, which is now a division of National Instruments. Complete details on the PMOD specification can be found here.

The specific interface used for the MAX11205PMB1 boards is SPI.

P1 Pin Number Pin Function Mnemonic
Pin 1 N.C. CS
Pin 2 N.C. MOSI
Pin 3 Master In Slave Out MISO
Pin 4 Serial Clock SCLK
Pin 5 Digital Ground DGND
Pin 6 Digital Power VDD

ADI No-OS

The goal of ADI Microcontroller No-OS is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. ADI No-OS offers generic drivers which can be used as a base for any microcontroller platform and also example projects which are using these drivers on various microcontroller platforms.

For more information about ADI No-OS and supported microcontroller platforms see: no-OS

MAX11205 Driver

Information about the MAX11205 driver can be found here: MAX11205 driver

No-OS Supported Platforms

Maxim Platform

Hardware Setup

Required Hardware
Required Connections

The MAX32655 does not have a PMOD interface, but you may use Dupont male-female cables to make the required connections. The following table shows how the connection between MAX11205PMB1 and MAX32655 is realized in this project example.

P1 MAX11205PMB1 Pin Number MAX32655 Pin Number Function Mnemonic
Pin 1 N.C. - -
Pin 2 N.C. - -
Pin 3 MISO Master In Slave Out MISO
Pin 4 SCLK Serial Clock SCLK
Pin 5 GND Digital Ground DGND
Pin 6 POWER 3.3V Digital Power VDD
Pin 3 P1_6 Data Ready DRDY

No-OS Build Setup

No-OS Clone

NOTE: This build guide is valid for the projects found in the no-OS/projects folder. If your project resides elsewhere under the no-OS repository tree, it is a legacy project. A build guide for legacy projects can be found Build no-OS with GNU make.

Clone NO-OS with the --recursive flag:

git clone --recursive https://github.com/analogdevicesinc/no-OS

If however you've already cloned NO-OS without the --recursive flag, you may initialize all the submodules in an existing NO-OS clone with:

git submodule update --recursive --init

→ Read more...

No-OS Build Prerequisites

Please follow the steps below for No-OS Setup based on the environment you are using. Make sure you use the information for the specific platform you are using (e.g. MAXIM).

Prior to building a no-OS project, it is required to set up some environment variables so that the build process may find the necessary tools (compiler, linker, SDK etc.).

Use the following commands to prepare your environment for building no-OS projects:

Linux (Click to expand)

Linux (Click to expand)

Make sure the GNU Make version you are using is >= 4.2.

Intel (Click to expand)

Intel (Click to expand)

Assuming the SDK is installed at this path:

/path/to/intel
└── intelFPGA
    └── 18.1

Run:

$ source no-OS/tools/scripts/platform/intel/environment.sh /path/to/intel/intelFPGA 18.1

Xilinx (Click to expand)

Xilinx (Click to expand)

Assuming the Vitis 2022.2 is installed at this path:

/path/to/xilinx
├── DocNav
├── Downloads
└── Vitis
    └── 2022.2

Run:

$ source /path/to/xilinx/Vitis/2022.2/settings64.sh

STM32 (Click to expand)

STM32 (Click to expand)

  • Install stm32cubeide to default location /opt/stm32cubeide. If you'd rather install it at a different location, run export STM32CUBEIDE=/path/to/your/stm32cubeide in the terminal used for building.
  • Install stm32cubemx to default location /opt/stm32cubemx. If you'd rather install it at a different location, run export STM32CUBEMX=/path/to/your/stm32cubemx in the terminal used for building.
  • Currently we are testing projects with CubeMx Version 6.5.0, but other versions should work as well.
  • Install java (openjdk-17), sed and head (if not already present, they normally are).
  • Install python (if not already present) and make sure python command executes Python3 (not Python2). This can be easily achieved by running the following command sudo apt install python-is-python3.

Maxim (Click to expand)

Maxim (Click to expand)

  • Install the Maxim Micros SDK.
  • Set the MAXIM_LIBRARIES environment variable to the MaximSDK/Libraries path (the default should be ~/MaximSDK/Libraries).
  • For visual debugging and building, install Visual Studio Code, and the Cortex-Debug extension.

Mbed (Click to expand)

Mbed (Click to expand)

  • Install Mbed CLI 1 as per guide here: https://os.mbed.com/docs/mbed-os/v6.15/build-tools/install-and-set-up.html .Usually the following steps should be sufficient: sudo apt install python3 python3-pip git mercurial gcc-arm-none-eabi and sudo python3 -m pip install mbed-cli pyelftools==0.29.
  • Configure the compiler location with Mbed CLI. This can be carried out by running the “mbed config -G GCC_ARM_PATH “path-to-your-gcc-compiler”” in Command Prompt.

Pico (Click to expand)

Pico (Click to expand)

  • Set the PICO_SDK_PATH environment variable to the pico-sdk cloned repository path.
  • Install the J-Link software
  • Set the JLINK_SERVER_PATH environment variable to the JLinkGDBServerCLExe path (the default path should be /opt/SEGGER/JLink/JLinkGDBServerCLExe).
  • For visual debugging and building, install Visual Studio Code, and the Cortex-Debug extension.

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

Please install all the necessary packs locally and then manually import them in CrossCore

Common Issues with environment setup:

  • Makefiles searches for the CCES_HOME in its default installation directory. It may happen that multiple version are installed and may not work. To select a CCES_HOME run export CCES_HOME=/opt/analog/cces/2.10.0

Windows (Click to expand)

Windows (Click to expand)

Open up a Git Bash as Administrator once and run the tools/scripts/git-bash.sh script. Close the window. You only need to do this once per Git Bash installation.
Use Git Bash (unelevated) for the rest of your development.

Xilinx (Click to expand)

Xilinx (Click to expand)

Assuming the Vitis 2022.2 is installed at this path:

C:\Xilinx
├── DocNav
├── Downloads
└── Vitis
    └── 2022.2

Run:

$ export PATH=/c/Xilinx/Vitis/2022.2/bin:/c/Xilinx/Vitis/2022.2/gnu/aarch64/nt/aarch64-none/bin/:$PATH

Maxim (Click to expand)

Maxim (Click to expand)

  • Install the Maxim Micros SDK to a path without whitespaces like C:\MaximSDK.
  • Set the MAXIM_LIBRARIES environment variable by running: export MAXIM_LIBRARIES=/c/MaximSDK/Libraries.
  • (Optional) For visual debugging and building, install Visual Studio Code, and the Cortex-Debug extension.

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

No-OS Build Project

The path of the project is no-OS/projects/max11205pmb1/

Go in the project directory that should be built.

Linux (Click to expand)

Linux (Click to expand)

$ cd no-OS/projects/project_name/
$ tree
.
├── builds.json
├── Makefile
├── src
└── src.mk

Intel (Click to expand)

Intel (Click to expand)

Copy the .sof and .sopcinfo to the project folder.

$ ls
Makefile  profiles  src  src.mk  system_bd.sopcinfo  adrv9009_a10gx.sof	
$ make

# Alternatively you may select a .sopcinfo file explicitly by:
$ make HARDWARE=path/to/system_bd.sopcinfo

Xilinx (Click to expand)

Xilinx (Click to expand)

Copy the .xsa in the project folder.

$ ls
Makefile  profiles  src  src.mk system_top.xsa
$ make

# Alternatively you may select an .xsa file explicitly by:
$ make HARDWARE=path/to/file.xsa

Maxim (Click to expand)

Maxim (Click to expand)

To build a project, type:

make PLATFORM=maxim TARGET=...

The TARGET specifies the chip for which the project is built. If it is missing, max32660 will be used. At the moment, the available targets are: max32650, max32655, max32660, max32665, max32670, max32690 and max78000.

Mbed (Click to expand)

Mbed (Click to expand)

To build a project, type:

make PLATFORM=mbed

Pico (Click to expand)

Pico (Click to expand)

To build a project, type:

make PLATFORM=pico

STM32 (Click to expand)

STM32 (Click to expand)

Make sure you have the .ioc file in the project directory, then type:

$ make PLATFORM=stm32

If during the project generation you get a dialog saying that you are using an .ioc file generated with an old CubeMX version, click Continue. Migrate is also a valid option but only if you know what you are doing.

If you're trying to use an .ioc file generated with a newer CubeMX than the one installed on your machine, you will get a prompt that asks you to upgrade your installation to the new version, there is no other choice than to click OK and then manually upgrade.

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

The ADuCM3029 projects also contain a pinmux_config.c file which contains pin configuration instructions.

# build an ADuCM3029-only project
$ make

# if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM
$ make PLATFORM=aducm3029

Windows (Click to expand)

Windows (Click to expand)

Use Git Bash to run these commands.
$ cd no-OS/projects/project_name

It should contain make-related files and source files:

./no-OS/projects/project_name
├── builds.json
├── Makefile
├── src
└── src.mk

Xilinx (Click to expand)

Xilinx (Click to expand)

Copy the .xsa to the project folder and run:

./no-OS/projects/adrv9009
├── Makefile
├── profiles
├── src
├── src.mk
└── system_top.xsa

$ make

Maxim (Click to expand)

Maxim (Click to expand)

To build a project, type:

$ make PLATFORM=maxim TARGET=...

The TARGET specifies the chip for which the project is built. If it is missing, max32660 will be used. At the moment, the available targets are: max32650, max32655, max32660, max32665, max32670, max32690 and max78000.

ADuCM3029 (Click to expand)

ADuCM3029 (Click to expand)

$ export PLATFORM=aducm3029
$ make

The build process creates a build directory in the project folder:

build
├── app
├── bsp
├── obj
├── project_name.elf
└── tmp

Debug

Once the .elf, .hex or .bin file has been generated, make sure the board is powered on, JTAG cable connected and use the following commands to upload the program to the board or debug.

Uploading the binary to target is generically achieved with:

$ make run

Xilinx (Click to expand)

Xilinx (Click to expand)

For Xilinx project you can flash the board connected to a remote host. On the remote host make sure to start `hw_server`. On your development environment run

$ export XSCT_REMOTE_HOST=<remote host ip>
$ export XSCT_REMOTE_PORT=<remote host hw_server port>
$ make run

By default the `hw_server` port should be 3121.

Use the following command to launch the SDK associated to the used platform in order to be able to debug graphically by clicking the debug button:

$ make sdkopen

Fore more details about the available make rules, check out this page.

Running/Debugging in WSL

Example Project Execution

Basic Project

Makefile Selection

In order to build the dummy project make sure you have the following configuration in the Makefile:

# Select the example you want to enable by choosing y for enabling and n for disabling
BASIC_EXAMPLE = y
IIO_EXAMPLE = n

When running make command make sure to specify the platform you want to build the project for.

Project Description

The basic project contains the generic HAL initialization of the used platform, together with the SPI, IRQ and UART driver configuration and initialization.

The SPI driver is used to communicate with the MAX11205PMB1 device, the IRQ driver is used to sample data when the conversion finishes (signaled by MISO line) and the UART driver is used to display on the host machine the measured data.

The dummy project contains the MAX11205 driver initialization:

struct no_os_irq_init_param max11205_gpio_irq_ip = {
	.platform_ops = GPIO_IRQ_OPS,
	.irq_ctrl_id = GPIO_CTRL_IRQ_ID,
	.extra = GPIO_IRQ_EXTRA,
};
 
struct no_os_spi_init_param max11205_spi_ip = {
	.device_id = SPI_DEVICE_ID,
	.max_speed_hz = SPI_BAUDRATE,
	.bit_order = NO_OS_SPI_BIT_ORDER_MSB_FIRST,
	.mode = NO_OS_SPI_MODE_2,
	.platform_ops = SPI_OPS,
	.chip_select = SPI_CS,
	.extra = SPI_EXTRA,
};
 
struct no_os_gpio_init_param max11205_gpio_rdy_ip = {
	.port = GPIO_SYNC_PORT_NUM,
	.number = GPIO_SYNC_PIN_NUM,
	.pull = NO_OS_PULL_NONE,
	.platform_ops = GPIO_OPS,
	.extra = GPIO_EXTRA,
};
 
struct max11205_init_param max11205_ip = {
	.gpio_rdy = &max11205_gpio_rdy_ip,
	.vref_mv = MAX11205_VREF_MV,
};
 
/* Initialize GPIO IRQ controller */
ret = no_os_irq_ctrl_init(&max11205_gpio_irq_desc, &max11205_gpio_irq_ip);
if (ret)
	return ret;
 
/* Initialize device */
max11205_ip.irq_ctrl = max11205_gpio_irq_desc;
max11205_ip.spi_init = max11205_spi_ip;
ret = max11205_init(&max11205_desc, max11205_ip);
if (ret)
	return ret;

After the initialization phase, the device starts performing measurements which are accessed continuously in a while loop and are written on UART.

/* Continuously read data */
while (1) {
	ret = max11205_get_data_raw(max11205_desc, &new_data_avail, &adc_data_raw);
	if (ret)
		return ret;
	/* Print data only if new data is available */
	if (new_data_avail) {
		pr_info("ADC raw data %d:\n", adc_data_raw);
 
		ret  = max11205_get_data_mv(max11205_desc, adc_data_raw, &adc_data_mv);
		if (ret)
			return ret;
 
		pr_info("ADC converted data %d [mV]:\n", adc_data_mv);
	}
}

Project Execution

UART Output for V_REF=3200 [mV], with V_IN=1300 [mV]:

ADC raw data 13097:
ADC converted data 1279 [mV]:

IIO Project

Makefile Selection

In order to build the IIO project make sure you have the following configuration in the Makefile:

# Select the example you want to enable by choosing y for enabling and n for disabling
BASIC_EXAMPLE = n
IIO_EXAMPLE = y

When running make command make sure to specify the platform you want to build the project for.

Project Description

This project is actually a TINYIIOD demo for MAX11205PMB1 board. The project launches a TINYIIOD server on the board so that the user may connect to it via an IIO client. Using IIO-Oscilloscope, the user can view the measured data on a plot.

If you are not familiar with ADI IIO Application, please take a look at: IIO No-OS

This IIO Project uses IIO-Oscilloscope as a client. If you are not familir with ADI IIO-Oscilloscope Client, please take a look at: IIO Oscilloscope

The No-OS IIO Application together with the No-OS IIO MAX11205 driver take care of all the backend logic needed to setup the IIO server. The user has to initialize the IIO device and call the IIO app as shown below. The read buffer is used for storing data which shall be available on the plot in the IIO Oscilloscope Client.

#define DATA_BUFFER_SIZE 400
uint8_t iio_data_buffer[DATA_BUFFER_SIZE * sizeof(int16_t)];
struct iio_data_buffer accel_buff = {
	.buff = (void *)iio_data_buffer,
	.size = DATA_BUFFER_SIZE * sizeof(int16_t)
};
struct no_os_irq_init_param max11205_gpio_irq_ip = {
	.platform_ops = GPIO_IRQ_OPS,
	.irq_ctrl_id = GPIO_CTRL_IRQ_ID,
	.extra = GPIO_IRQ_EXTRA,
};

struct no_os_spi_init_param max11205_spi_ip = {
	.device_id = SPI_DEVICE_ID,
	.max_speed_hz = SPI_BAUDRATE,
	.bit_order = NO_OS_SPI_BIT_ORDER_MSB_FIRST,
	.mode = NO_OS_SPI_MODE_2,
	.platform_ops = SPI_OPS,
	.chip_select = SPI_CS,
	.extra = SPI_EXTRA,
};

struct no_os_gpio_init_param max11205_gpio_rdy_ip = {
	.port = GPIO_SYNC_PORT_NUM,
	.number = GPIO_SYNC_PIN_NUM,
	.pull = NO_OS_PULL_NONE,
	.platform_ops = GPIO_OPS,
	.extra = GPIO_EXTRA,
};

struct max11205_init_param max11205_ip = {
	.gpio_rdy = &max11205_gpio_rdy_ip,
	.vref_mv = MAX11205_VREF_MV,
};

int ret;
struct max11205_iio_dev *max11205_iio_desc;
struct max11205_iio_dev_init_param max11205_iio_ip;
struct no_os_irq_ctrl_desc *max11205_gpio_irq_desc;

/* Initialize GPIO IRQ controller */
ret = no_os_irq_ctrl_init(&max11205_gpio_irq_desc, &max11205_gpio_irq_ip);
if (ret)
	return ret;

/* Initialize device */
max11205_ip.irq_ctrl = max11205_gpio_irq_desc;
max11205_ip.spi_init = max11205_spi_ip;

max11205_iio_ip.max11205_dev_init = &max11205_ip;
max11205_iio_ip.dev_id = MAX11205A;

ret = max11205_iio_init(&max11205_iio_desc, &max11205_iio_ip);
if (ret)
	return ret;

struct iio_app_device iio_devices[] = {
	{
		.name = "max11205a",
		.dev = max11205_iio_desc,
		.dev_descriptor = max11205_iio_desc->iio_dev,
		.read_buff = &accel_buff,
	}
};

return iio_app_run(iio_devices, NO_OS_ARRAY_SIZE(iio_devices));

Project Execution

After flashing and running the application, IIO Oscilloscope can be used to obtain the desired data. Below you may find some snippets from IIO Oscilloscope, when running IIO Project:

Bellow you can see the Connection window for IIO Oscilloscope. The handshake is performed and the device is detected over UART. After pressing the Connect button we can see the device in the list, together with its channels and we can see the measured data.

Note that when running the project on Maxim platform, a baudrate of 57600 should be selected from the IIO Oscilloscope interface.

Below you can see the Simple View which contains the read data from the ADC. Observe how the measurements change when changing the V_IN value.

Below you can see the Debug View which contains the list of attributes for the voltage channel.

Below you can see the Plot View for the converted data. The Plot view shows the raw vales measured by the ADC. Observe how the measurements change when changing the V_IN value.

resources/eval/user-guides/max11205pmb1/no-os-setup.txt · Last modified: 27 Sep 2022 17:21 by Darius B