下载
Maxim > Design Support > Technical Documents > Application Notes > Energy Measurement & Metering > APP 5751
Keywords: computation engine (CE) code, microprocessing unit (MPU) code, compile and link meter/demo code
APPLICATION NOTE 5751
Compiling Meter Code with New Computation Engine
(CE) Code Images
Nov 19, 2013
Abstract:
This application
note describes how to modify demo code or meter application code so it can be compiled
and linked with new computation engine (CE) code images for the 71M6531/71M6532 and 71M6533/71M6534 and
71M6541/71M6542/71M6543 family of electricity metering ICs.
Introduction
Background
The 71M6531/71M6532 and 71M6533/71M6534 and 71M6541/71M6542/71M6543 families of electricity metering ICs
are designed to be used with computation engine (CE) codes that can be adapted to the application at hand. In some
cases, special CE codes are required and supplied by Maxim to support different sensor types or features such as
filtering or harmonic analysis.
Since CE codes occupy different spaces in flash memory and XRAM, depending on the application, several steps are
needed to accommodate a specific CE code image. This is done by modifying both the meter code (demo code or
meter application code) sources and the Keil
®
compiler settings (Keil µVision
®
4).
This application note discusses the necessary steps to successfully integrate a new CE code image into meter code.
A general knowledge of the tools, i.e. Keil µVision and Signum Systems™ WEMU51 is helpful when performing the
tasks described in this application note. Reading the software user guide (SUG) for the 71M653x and/or 71M654x
ICs is recommended.
General Interface Between Meter Code and CE Code
How CE Code and CE Data Files Are Delivered
Source code for the CE is not available to the customer. CE code is delivered as a code image that is linked into the
meter code flash image and then interpreted as CE op codes and executed by the CE at run time. When executing,
the CE code needs certain registers in XRAM (CE RAM) to be initialized. For example, calibration coefficients for an
uncalibrated (default) meter are set to 0x4000, and typically a standard value for WRATE is also part of the CE data
image. The files for CE code that are delivered to the customer are the following:
CE code image (for example CE34B07G_ce.c): This code is for the 71M6534 or 71M6533, and its version is
B07G.
CE data image (for example CE34B07G_dat.c): This set of data is for the code version B07G for the 71M6534
or 71M6533.
CE files are named with the leading characters “CE”, followed by two digits specifying the meter system-on-chip
(SoC) family, e.g. “34” for the 71M6533 and 71M6534, or “41” for the 71M6541 and 71M6542. The next letter
generally specifies the silicon revision (A, B, C, …) that the code is compatible with. The two digits after the revision
Page 1 of 22