Wiki

This version (24 May 2023 02:25) was approved by Jose Ramon San Buenaventura.

Evaluating the EVAL-LTC4306

Supported Evaluation Boards

Overview

The EVAL-LTC4306 features the LTC4306, a 4-channel, 2-wire I2C bus and SMBus-compatible multiplexer, which has bus buffers that provide capacitive isolation between the upstream bus and downstream buses.

This evaluation board provides 6-pin PMOD connectors for upstream and downstream connection for compatibility with PMOD form factors such as EVAL-ADICUP3029, an Arduino-based wireless development platform for Internet of Things applications based on an ultralow power ARM Cortex-M3 processor.

The EVAL-LTC4306 comes with PMOD connectors and 10 kΩ pull up resistors on both the upstream and downstream side, and 0.1 µF bypass capacitor on the upstream side. The user also has the option to add a 6-pin, 2.54 mm pitch pin header for connection to the GPIO pins for added functionality.

The user can also add test points on different places on the board for fault monitoring and place additional bypass capacitors (0805 size footprint) on the upstream and the downstream side for defense against any unwanted noise in their system and for adequate bypassing on power supply lines.


ADI No-OS

The goal of ADI Microcontroller No-OS is to provide reference projects for lower end processors, which can't run Linux or aren't running a specific operating system, and 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, visit the No-OS User Guide found here.

LTC4306 No-OS Driver

Information about the LTC4306 driver can be found here: LTC4306 No-OS Driver

No-OS Supported Platforms

Maxim Platform

Hardware Setup

Required Hardware
Required Connections

The MAX32666FTHR does not have a PMOD interface, but you may use Dupont female-female cables to make the required connections. The table below shows the connection between EVAL-LTC4306 and MAX32666FTHR.

EVAL-LTC4306 Pin Number (P3) MAX32666 Pin Number Function Mnemonic
VCC 3V3 3.3 V Supply (for IO) 3V3
GND GND Board Ground GND
SCLIN SCL Serial Clock SCL
SDAIN SDA Serial Data SDA

Once the EVAL-LTC4306 and MAX32666FTHR are connected, the MAX9611PMB1's can be connected to the LTC4306 channels via the PMOD connectors. Secure the connections to ensure proper and continuous operation of the setup.

For Maxim platforms, the following UART settings are used:

Speed 57600
Data Bits 8
Stop Bits 1
Parity None
Flow Control None


ADuCM3029 Platform

Hardware Setup

Required Hardware
Required Connections

Connect the EVAL-LTC4306 via the EVAL-ADICUP3029's PMOD I2C headers (8 pins, P9). Once connected, attach the MAX9611PMB1's to one or more channels. Secure the connections to ensure proper and continuous operation of the setup.

For ADuCM3029 platform, the following UART settings are used:

Speed 115200
Data Bits 8
Stop Bits 1
Parity None
Flow Control None

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

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/eval-ltc4306/

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 Example Project

Project Description

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

The I2C driver is used to communicate with the EVAL-LTC4306 and MAX9611PMB1 to change settings, and the UART driver is used to display on the host machine any information to help in understanding the project's operation.

The basic project contains the LTC4306 driver initialization and project functions:

/* Continuously configure the part and measure pins with an oscilloscope for observation */
	struct ltc4306_dev *ltc4306;
	struct max538x_dev *max538x;
	float v0[] = {0.16, 0.26, 0.36, 0.46, 0.56, 0.66, 0.76, 0.86, 0.96};
	float inc = 0.5;
	int ret, i, j;
	int voltage_inc = NO_OS_ARRAY_SIZE(v0);
	int flash_instances = 16;
 
	ret = ltc4306_addr_gen(&ltc4306_user_init, LTC4306_HIGH, LTC4306_HIGH,
			       LTC4306_HIGH);
	if (ret)
		goto error_ltc4306;
 
	ret = ltc4306_init(&ltc4306, ltc4306_user_init);
	if (ret)
		goto error_ltc4306;
 
	ret = max538x_init(&max538x, max538x_user_init);
	if (ret)
		goto error_max538x;
 
	for (i = 1; i < 3; i++) {
		ret = ltc4306_set_gpio_output_state(ltc4306, i, true);
		if (ret)
			goto error_ltc4306;
	}
 
	pr_info("LTC4306 GPIO LED's will blink %d times:\n", flash_instances);
 
	/* Blink LTC4306 Green LEDs*/
	for (i = 0; i < flash_instances; i++) {
		ret = ltc4306_set_gpio_output_state(ltc4306, 2, false);
		if (ret)
			goto error_ltc4306;
 
		no_os_mdelay(50);
 
		ret = ltc4306_set_gpio_output_state(ltc4306, 1, false);
		if (ret)
			goto error_ltc4306;
 
		no_os_mdelay(50);
 
		ret = ltc4306_set_gpio_output_state(ltc4306, 2, true);
		if (ret)
			goto error_ltc4306;
 
		no_os_mdelay(50);
 
		ret = ltc4306_set_gpio_output_state(ltc4306, 1, true);
		if (ret)
			goto error_ltc4306;
 
		no_os_mdelay(50);
	}
 
	/* Turn OFF LTC4306 Green GPIO LEDs */
	ret = ltc4306_set_gpio_output_state(ltc4306, 1, true);
	if (ret)
		goto error_ltc4306;
 
	ret = ltc4306_set_gpio_output_state(ltc4306, 2, true);
	if (ret)
		goto error_ltc4306;
 
	pr_info("LTC4306 configure the %d attached MAX5380 DAC's: \n",
		LTC4306_NUM_DOWNSTREAM);
	for (i = 0; i < LTC4306_NUM_DOWNSTREAM; i++) {
		pr_info("DAC %d: \t", i + 1);
		for (j = 0; j < voltage_inc; j++) {
			pr_info("%0.4f \t", (v0[j] + (inc * (float)i)));
		}
		pr_info("\n");
	}
 
	no_os_mdelay(50);
 
	/* Multiple DAC Configuration Loop */
	while (1) {
		for (j = 0; j < voltage_inc; j ++) {
			for (i = 0; i < LTC4306_NUM_DOWNSTREAM; i++) {
				ret = ltc4306_set_downstream_channel(ltc4306,
								     LTC4306_USED_DOWNSTREAM_CHANNELS[i], true);
				if (ret)
					goto error_ltc4306;
 
				ret = max538x_set_voutput(max538x, (v0[j] + (inc * (float)i)));
				if (ret)
					goto error_max538x;
 
				ret = ltc4306_set_downstream_channel(ltc4306,
								     LTC4306_USED_DOWNSTREAM_CHANNELS[i], false);
				if (ret)
					goto error_ltc4306;
			}
		}// end num downstream
	}// end while

Project Execution

Serial output when running the basic project:

LTC4306 GPIO LED's will blink 16 times:
LTC4306 configure the 2 attached MAX5380 DAC's:
DAC 1: 0.1600  0.2600  0.3600  0.4600  0.5600  0.6600  0.7600  0.8600  0.9600 
DAC 2: 0.6600  0.7600  0.8600  0.9600  1.0600  1.1600  1.2600  1.3600  1.4600

Output Capture

The image below shows the example scope shot with two MAX9611PMB's connected to Channels 1 and 2 of the LTC4306:

Legend
Orange Channel 1
Purple Channel 2
Time 20 mS/div
Amplitude 500 mV/div


Hardware Output Checking

To check the hardware output when using the example code, follow below steps:

  1. Connect the EVAL-LTC4306 to the microcontroller board by following the required connections in Hardware Setup.
  2. Connect the MAX9611PMB1's to the corresponding channels (check LTC4306_NUM_DOWNSTREAM variable in basic_example.c for any changes necessary or reference) on the EVAL-LTC4306.
  3. Build and load the example .hex file to the microcontroller board.
  4. Reset or reconnect the microcontroller board to the computer or a power supply.
  5. Observe the EVAL-LTC4306's green GPIO LEDs blink for a couple of times (default is 16 times).
  6. Connect each MAX9611PMB1 output to an oscilloscope channel.
  7. For proper operation, a sawtooth wave offset from each other should be seen (i.e., 500 mV offset between Ch1 and Ch2).
The example project runs sequentially and continuously repeats the process until power is removed.




End of document

resources/eval/user-guides/eval-ltc4306/no-os-setup.txt · Last modified: 24 May 2023 02:23 by Joyce Velasco