Linux for Power System Management

0
87

Abstract

An open-source, autoconfig Linux C/C++ application for digital power system management (PSM) devices is sourced on github. It runs in user space using /dev/i2c for I2C communication. This application note introduces the code framework, debugging, and web-based tool support and also discusses two master solutions.

After reading the application note, the goal is to achieve successful downloading, compiling, and running the application to use for custom software design, device programming, or power system debugging.

Experience with writing Linux C applications for user-mode executables is helpful.

Introduction

Most power system management (PSM) designs follow a set-and-forget model. When paired with LTpowerPlay, the setup and debug of PSM devices are simplified. Also, to make matters easier, software/firmware is not required when combined with a bulk programming solution. However, many large systems require a board management controller (BMC). This raises the question: “What can software or firmware do for PSM?”

The foundation of PSM software/firmware is the PMBus, which is the basis of the SMBus, and the cornerstone of the SMBus is I2C. Building a BMC that adds value with PSM software/firmware requires some level of knowledge of each protocol or preexisting classes/codes to free the programmer from the details.

The Linux example application handles each protocol layer and provides an application programming interface (API) to facilitate writing user-space PSM software/firmware. Linux PSM is not a replacement for a BMC, but rather a set of classes and an example application that is compatible with typical BMC software/firmware.

Linux can also be used with ADI evaluation boards as a learning tool. It is quite common for engineers to copy and paste Linux code snippets into an existing application and use them. But it is also possible to reuse the whole class hierarchy, including:

  • Device and rail discovery
  • Command API
  • Fault log decoding
  • In-system programming

This application note presents the Linux code base, PSM programming, setup, and use of Linux PSM with evaluation boards as well as PSM debugging techniques. For detailed information on the protocols and generic programming questions, refer to Application Note 135: Implementing Robust PMBus Software for the LTC3880 and the industry standards for I2C/SMBus/PMBus.1

Figure 1. Evaluation and development hardware

Linux PSM

Evaluation and Development Hardware

Linux PSM hardware consists of a Devantech USB-to-I2C adapter (a small, three-wire-connected device) to connect to the PMBus, SMBus, or I2C bus of an evaluation board (middle board) or an end-product board.

For optimal learning, start with a DC1613A, a DC1962C2 , a Devantech adapter3 , and a Total Phase Beagle 4 (I2C sniffer). These devices present the programming, debugging, and learning of controllers (LTC388X/µModules) and managers (LTC297X).

Figure 1 shows the recommended hardware, which is connected by grabber clips. To use this hardware with the Linux PSM software, connect the Devantech adapter and the Beagle to a Linux computer with two Type A-to-B USB cables (Type A connects to the small board, Type B connects to the computer). If the Beagle’s USB is not connected, separate the Beagle’s ribbon cable from the grabber clips to prevent interference with PMBus traffic to/from the DC1962C5 .

Read the full article here.