Microchip PAC194X/5X Manual
Microchip
Ikke kategoriseret
PAC194X/5X
Læs gratis den danske manual til Microchip PAC194X/5X (83 sider) i kategorien Ikke kategoriseret. Denne vejledning er vurderet som hjælpsom af 23 personer og har en gennemsnitlig bedømmelse på 4.9 stjerner ud af 12 anmeldelser. Har du et spørgsmål om Microchip PAC194X/5X, eller vil du spørge andre brugere om produktet?
Side 1/83

2021-2022
Microchip Technology Inc. and its subsidiaries DS50003155B
PAC194X/5X
UEFI BIOS Integration
and Microsoft® Windows® 10
and Windows 11
Energy Meter Interface Device Driver
User’s Guide

DS50003155B-page 2
2021-2022
Microchip Technology Inc. and its subsidiaries
This publication and the information herein may be used only
with Microchip products, including to design, test, and integrate
Microchip products with your application. Use of this informa-
tion in any other manner violates these terms. Information
regarding device applications is provided only for your conve-
nience and may be superseded by updates. It is your responsi-
bility to ensure that your application meets with your
specifications. Contact your local Microchip sales office for
additional support or, obtain additional support at https://
www.microchip.com/en-us/support/design-help/client-support-
services.
THIS INFORMATION IS PROVIDED BY MICROCHIP "AS IS".
MICROCHIP MAKES NO REPRESENTATIONS OR WAR-
RANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED,
WRITTEN OR ORAL, STATUTORY OR OTHERWISE,
RELATED TO THE INFORMATION INCLUDING BUT NOT
LIMITED TO ANY IMPLIED WARRANTIES OF NON-
INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
PARTICULAR PURPOSE, OR WARRANTIES RELATED TO
ITS CONDITION, QUALITY, OR PERFORMANCE.
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDI-
RECT, SPECIAL, PUNITIVE, INCIDENTAL, OR CONSE-
QUENTIAL LOSS, DAMAGE, COST, OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE INFORMATION OR
ITS USE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES
ARE FORESEEABLE. TO THE FULLEST EXTENT
ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON
ALL CLAIMS IN ANY WAY RELATED TO THE INFORMATION
OR ITS USE WILL NOT EXCEED THE AMOUNT OF FEES, IF
ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP
FOR THE INFORMATION.
Use of Microchip devices in life support and/or safety applica-
tions is entirely at the buyer's risk, and the buyer agrees to
defend, indemnify and hold harmless Microchip from any and
all damages, claims, suits, or expenses resulting from such
use. No licenses are conveyed, implicitly or otherwise, under
any Microchip intellectual property rights unless otherwise
stated.
Note the following details of the code protection feature on Microchip products:
• Microchip products meet the specifications contained in their particular Microchip Data Sheet.
• Microchip believes that its family of products is secure when used in the intended manner, within operating specifications, and
under normal conditions.
• Microchip values and aggressively protects its intellectual property rights. Attempts to breach the code protection features of
Microchip product is strictly prohibited and may violate the Digital Millennium Copyright Act.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of its code. Code protection does not
mean that we are guaranteeing the product is “unbreakable”. Code protection is constantly evolving. Microchip is committed to
continuously improving the code protection features of our products.
Trademarks
The Microchip name and logo, the Microchip logo, Adaptec,
AnyRate, AVR, AVR logo, AVR Freaks, BesTime, BitCloud,
CryptoMemory, CryptoRF, dsPIC, flexPWR, HELDO, IGLOO,
JukeBlox, KeeLoq, Kleer, LANCheck, LinkMD, maXStylus,
maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo,
MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower,
PICSTART, PIC32 logo, PolarFire, Prochip Designer, QTouch,
SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash,
Symmetricom, SyncServer, Tachyon, TimeSource, tinyAVR, UNI/O,
Vectron, and XMEGA are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
AgileSwitch, APT, ClockWorks, The Embedded Control Solutions
Company, EtherSynch, Flashtec, Hyper Speed Control, HyperLight
Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3,
Precision Edge, ProASIC, ProASIC Plus, ProASIC Plus logo, Quiet-
Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub,
TimePictra, TimeProvider, TrueTime, WinPath, and ZL are
registered trademarks of Microchip Technology Incorporated in the
U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any
Capacitor, AnyIn, AnyOut, Augmented Switching, BlueSky,
BodyCom, CodeGuard, CryptoAuthentication, CryptoAutomotive,
CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net,
Dynamic Average Matching, DAM, ECAN, Espresso T1S,
EtherGREEN, GridTime, IdealBridge, In-Circuit Serial
Programming, ICSP, INICnet, Intelligent Paralleling, Inter-Chip
Connectivity, JitterBlocker, Knob-on-Display, maxCrypto, maxView,
memBrain, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo,
MPLIB, MPLINK, MultiTRAK, NetDetach, NVM Express, NVMe,
Omniscient Code Generation, PICDEM, PICDEM.net, PICkit,
PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple
Blocker, RTAX, RTG4, SAM-ICE, Serial Quad I/O, simpleMAP,
SimpliPHY, SmartBuffer, SmartHLS, SMART-I.S., storClad, SQI,
SuperSwitcher, SuperSwitcher II, Switchtec, SynchroPHY, Total
Endurance, TSHARC, USBCheck, VariSense, VectorBlox, VeriPHY,
ViewSpan, WiperLock, XpressConnect, and ZENA are trademarks
of Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated in
the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage
Technology, Symmcom, and Trusted Time are registered
trademarks of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany
II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in
other countries.
All other trademarks mentioned herein are property of their
respective companies.
© 2021-2022, Microchip Technology Incorporated and its subsidiar-
ies.
All Rights Reserved.
ISBN: 978-1-5224-9459-1
For information regarding Microchip’s Quality Management Systems,
please visit www.microchip.com/quality.

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 3
Table of Contents
Preface ........................................................................................................................... 5
Introduction............................................................................................................ 5
Document Layout .................................................................................................. 5
Conventions Used in this Guide ............................................................................ 7
Recommended Reading........................................................................................ 8
The Microchip Web Site ........................................................................................ 8
Product Change Notification Service..................................................................... 8
Customer Support ................................................................................................. 8
Document Revision History ................................................................................... 9
Chapter 1. Product Overview
Chapter 2. Hardware Integration
2.1 I2C Bus Controller Windows Support ........................................................... 13
2.2 PAC194X/5X VDD, PWRDN, SLOW/ALERT1 and GPIO/ALERT2 Pin Connec-
tions ........................................................................................................ 13
2.3 Channel Sense Resistor (RSENSE) ............................................................ 15
2.4 Channel Polarity and Scale Range .............................................................. 15
2.5 PAC194X/5X-2 Connection Considerations ................................................. 16
Chapter 3. ACPI BIOS Integration
3.1 PAC194X/5X ACPI Device ........................................................................... 17
Chapter 4. Driver Installation
4.1 Prerequisites ................................................................................................ 23
4.2 Installation Instructions ................................................................................. 24
Chapter 5. Device Instantiation and Initialization
5.1 Getting Started ............................................................................................. 25
5.2 Device Configuration .................................................................................... 26
Chapter 6. PAC194X/5X Device Driver Interfaces
6.1 Introduction ................................................................................................... 29
6.2 Energy Meter Interface ................................................................................. 29
6.3 Device Control Interface ............................................................................... 31
Chapter 7. PAC194X/5X Driver Characteristics
7.1 Introduction ................................................................................................... 45
7.2 Multiple I/O Requests ................................................................................... 45
7.3 Energy Meter Interfaces (EMI) vs. Device Control Interfaces ...................... 45
7.4 Software Accumulators ................................................................................ 46
7.5 Low-Power Mode and Power States ............................................................ 46

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 5
Preface
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PAC194X/5X Microsoft® Windows® 10 and Windows 11 Device Drivers. Items dis-
cussed in this chapter include:
•Document Layout
•Conventions Used in this Guide
•Recommended Reading
•The Microchip Web Site
•Customer Support
•Document Revision History
DOCUMENT LAYOUT
This document describes how to integrate the PAC194X/5X devices in a Windows 10
or Windows 11 system, how to install the device driver and how to use the driver
software interfaces for configuring the device and reporting the data samples. The
manual layout is as follows:
•Chapter 1. “Product Overview” – This chapter presents the purpose of the
PAC194X/5X Device Driver and a high level picture about the associated software
ecosystem.
•Chapter 2. “Hardware Integration” – This chapter presents the key device
driver assumptions about the PAC194X/5X Device Driver hardware integration
into a Windows 10 or Windows 11 system.
•Chapter 3. “ACPI BIOS Integration” – This chapter presents the host system
ACPI BIOS implementation details required for the PAC194X/5X Device Driver
instantiation and configuration.
•Chapter 4. “Driver Installation” – This chapter presents the software dependen-
cies and the steps to follow in order to install the PAC194X/5X Device Driver in the
host Windows 10 or Windows 11 system.
NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXXXXA”, where “XXXXXXXX” is the document number and “A” is the revision level
of the document.
For the most up-to-date information on development tools, see the MPLAB® IDE online help.
Select the Help menu, and then Topics, to open a list of available online help files.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 6 2021-2022
Microchip Technology Inc. and its subsidiaries
•Chapter 5. “Device Instantiation and Initialization” – This chapter presents the
initial configuration steps performed by the PAC194X/5X Device Driver for each
device, based on the BIOS configuration options and the initial system power
state.
•Chapter 6. “PAC194X/5X Device Driver Interfaces” – This chapter provides the
driver's software interfaces details needed by the user applications or other soft-
ware modules to control the PAC194X/5X Device Driver configuration and to
access the data samples.
•Chapter 7. “PAC194X/5X Driver Characteristics” – This chapter presents
details about the driver features and operation, useful for the interoperation with
other applications or software modules.
•Appendix A. “Sample ACPI ASL PAC194X/5X Device Definition” – This
appendix contains the reference ACPI BIOS integration ASL code for one
PAC194X/5X Device Driver.
•Appendix B. “Testing the PAC194X/5X ACPI Integration” – This appendix
presents the software tools and the steps to follow in order to create, compile and
test the ACPI BIOS ASL code changes needed for the PAC194X/5X devices.
•Appendix C. “PAC194X/5X Device Control Interface” – This appendix provides
the detailed information about the PAC194X/5X Device Driver control interface,
data structures, IOCTL codes and command parameters.
•Appendix D. “Glossary of Terms and Acronyms”

Preface
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 7
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB® IDE User’s Guide
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or
dialog
“Save project before build”
Underlined, italic text with
right angle bracket
A menu path File>Save
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
4‘b0010, 2‘hF1
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, ‘A’
Italic Courier New A variable argument file.o, where file can be
any valid filename
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe
character: { | }
Choice of mutually exclusive
arguments; an OR selection
errorlevel {0|1}
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by
user
void main (void)
{ ...
}

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 10 2021-2022
Microchip Technology Inc. and its subsidiaries
NOTES:

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 11
Chapter 1. Product Overview
This document presents the PAC194X/5X Microsoft Windows 10 or Windows 11 Driver
technical aspects that users need to know in order to access the energy measurements
reported by PAC194X/5X DC power monitor devices. Every time the document is men-
tioning PAC194X/5X it refers to all device family models, including the PAC194X/5X-2
low side models. When the document is mentioning PAC194X/5X-2 it specifically refers
to the low-side device models only.
The document also describes the basic steps for integrating the PAC194X/5X device
in a Microsoft Windows 10 or Windows 11 host system to enable the support of the
PAC194X/5X device driver. As the PAC194X/5X device can be used in multiple ways
and in different system configurations, there are some specific hardware and BIOS
configuration details that need to be addressed before loading the Windows device
driver.
Starting with Microsoft Windows 10 operating system, the energy consumption of
various components from PC laptops or other portable devices can be monitored in
order to identify the optimal configuration options that can maximize the battery life.
The Energy Estimation Engine (E3) service in Microsoft Windows 10 or Windows 11
uses estimation algorithms or the real-time energy measured by metering ICs
connected into various power rails of the system.
The device drivers of the metering ICs must report the energy measurements to
Windows E3 module through a standard software interface, the Energy Meter Interface
(EMI). Windows E3 service or the user applications can access the energy data by
calling a standard set of EMI IOCTL operations.
The PAC194X/5X device driver creates in addition to the EMI interface a customized
“Device Control Interface” and implements an extended set of IOCTL operations which
provide access to much more data and device configuration options.
The application PAC194X/5X Energy Metering and Driver Interface Utility – EMI Utility
uses all the IOCTL operations implemented by the PAC194X/5X device driver to
demonstrate the device capabilities. The operator can also use it to change the device
initial configuration. Some of the device initial configuration parameters are provisioned
to the device driver by ACPI BIOS Device Specific Methods (DSM).
Figure 1-1 depicts the main software blocks and their interaction with the PAC194X/5X
device driver.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 12 2021-2022
Microchip Technology Inc. and its subsidiaries
FIGURE 1-1: PAC194X/5X Windows® 10 or Windows 11 Software Ecosystem.
3$&;;
:LQGRZV
'HYLFH'ULYHU
,&
&RQWUROOHU
'ULYHU
3$&;;
(0,8WLOLW\
$SS
3RZHUFIJ
$SS
Kernel space
User space
3$&;;
$&3,%,26
'60
SPB
Interface
(QHUJ\
(VWLPDWLRQ
(QJLQH(
EMI
Interface
Device
Control
Interface

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 13
Chapter 2. Hardware Integration
The hardware integration must first address all the electrical details specified in the
device datasheet. (For example, the device SDA pin is open drain and requires a
pull-up resistor to the I2C bus Controller VDD.)
The following notes refers only to the hardware details that need specific configuration
to make them compatible with the Windows 10 or Windows 11 device driver:
•I2C Bus Controller Windows Support
•PAC194X/5X VDD, PWRDN, SLOW/ALERT1 and GPIO/ALERT2 Pin Connec-
tions
•Channel Sense Resistor (RSENSE)
•Channel Polarity and Scale Range
•PAC194X/5X-2 Connection Considerations
2.1 I2C BUS CONTROLLER WINDOWS SUPPORT
The PAC194X/5X device I2C/SMBus interface is, by default, configured in the I2C
mode. Keep in mind that the SMBus protocol is not currently supported by Windows;
therefore, the system integrators must connect the PAC devices to the I2C bus
controllers for which a Windows device driver is available and the driver is compatible
with the Windows Simple Peripheral Bus Framework Extension (SpbCx). This is a
mandatory condition because the PAC194X/5X Windows device driver uses the SpbCx
standard software interface in order to communicate with I2C peripherals.
The I2C bus controller may be located in the system CPU (SoC architecture), in the
system Embedded Controller (EC) or may be another device connected to one of the
system internal buses.
2.2 PAC194X/5X VDD, PWRDN, SLOW/ALERT1 AND GPIO/ALERT2 PIN
CONNECTIONS
VDD and PWRDN pins – connected to “always on” power rail
The usual PAC194X/5X system integration scenario assumes that the system power
rails are also monitored during the “standby” or “hibernate” operating system power
states. Therefore, the PAC device VDD and PWRDN pins should be connected to a
system power rail that is not shut down by the system standby or hibernate power
sequence. This way, the PAC device continues to be capable of accumulating the data
about the system energy consumption during the standby/hibernate state, if desired.
The PAC194X/5X Windows device driver can retrieve and report these data to the
Windows Energy Estimation Engine (E3) or to the user applications.
SLOW/ALERT1 pin – configured as SLOW and controlled by hardware
The PAC194X/5X Windows device driver ensures that SLOW/ALERT1 pin is always
configured as “SLOW” signal and the pin transitions trigger the accumulator registers
“limited refresh”, latching the accumulated data (these are the PAC device default
settings.)

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 14 2021-2022
Microchip Technology Inc. and its subsidiaries
.
The data sample rate should be reduced to a minimum in standby/hibernate states, in
order to reduce the chances for accumulator register overflow and to facilitate a longer
data accumulation period in these states. The reduced sample rate also reduces the
energy used by PAC194X/5X device. In the normal system operation, the sample rate
control is done by the PAC194X/5X device driver that reconfigures the
SAMPLE_MODE bits from the PAC194X/5X CTRL register just before the operating
system entering the standby, hibernate or power down state.
In the case of an operating system crash, eventually the system is forcibly shutdown
by the user or by some automated safety mechanism, but the PAC194X/5X device
driver is not functional. If the power is not removed from the PAC VDD pin, the device
can still be reconfigured in slow sampling mode if the SLOW/ALERT1 pin is driven high
by hardware. For example, the SLOW/ALERT1 pin can be driven high by a hardware
block that detects the state of the CPU or the main memory power rails. Alternatively,
the SLOW/ALERT1 pin may be driven by the system Embedded Controller (EC). The
EC is usually an always on device, which performs various hardware low-level house-
keeping and controls the system power rails and the power-on sequence.
When the system is turned back on, the PAC194X/5X Windows device driver can
detect that SLOW/ALERT1 pin was asserted and collects the data accumulated and
latched by the pin de-assertion event.
Figure 2-1 is a simplified view of the recommended PAC194X/5X hardware integration
with the host system. The GPIO/ALERT2 signal is not included since it is used
optionally.
FIGURE 2-1: PAC194X/5X VDD and SLOW Pins Connections.
GPIO/ALERT2 pin – optional use
There is no design assumption implemented in the PAC194X/5X device driver about
the use of this pin. Therefore, the system designer may need to consider using a soft-
ware application for pin configuration and control or may choose to not use it at all.
The default configuration of the GPIO/ALERT2 pin is digital input. Alternatively, the sys-
tem designer may consider using this pin as digital signal output. The PAC194X/5X
device driver software interface provides functions for the following pin configuration
options:
• GPIO input – the user application uses the driver software interface to read the
digital input value
• GPIO output – the user application uses the driver software interface to control
6/2:
&38
3RZHU6XSSO\8QLW
,
&EXV
9''
6/2:VLJQDO
DFWLYHZKHQ
WKHV\VWHPLV
VKXWGRZQ
3$&;;
9''
DOZD\V³21´
3$&;;
3$&;;
3$&;;
1
Śϭ ŚϮ Śϯ Śϰ Śϭ ŚϮ Śϯ Śϰ Śϭ ŚϮ Śϯ Śϰ
s
s
s
^>Kt
^>Kt
^>Kt

Hardware Integration
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 15
the digital output value
• ALERT signal – the user application uses the driver software interface to select
the alert types (e.g. over/under current/voltage, over power) and the threshold val-
ues.
The PAC194X/5X Windows Energy Metering and Driver Interface Utility created by
Microchip is one example of a software application that uses the PAC194X/5X device
driver functions to provide user control over GPIO/ALERT2 pin, in a graphical, intuitive
interface.
2.3 CHANNEL SENSE RESISTOR (RSENSE)
PAC194X/5X Windows device driver supports sense resistor values that are integer
values when expressed in microohm units. For example, a value of 1500 microohms is
supported.
The best measurement precision can be achieved by using four-terminal current sense
resistors with built-in Kelvin connections for the sense lines and resistance tolerance of
1% or better.
FIGURE 2-2: Sense Resistor with Kelvin Connections.
2.4 CHANNEL POLARITY AND SCALE RANGE
After the Power-on Reset (POR), the PAC device default channel configuration is set
for unipolar voltage measurements (both VSENSE and VBUS) and the full-scale range
FSR values are set to the maximum voltage values supported by device (VSENSE
full-scale is 100 mV and VBUS full-scale is 32V on PAC195X or 9V on PAC194X). The
alternative configuration option (FSR/2) for the full-scale values reduces them by half.
The Windows device driver can change this configuration during the device initializa-
tion phase, as indicated by the ACPI BIOS Device Specific Method (DSM) parameters.
In addition, the user applications may call dedicated driver functions to change the
channel polarity and scale settings.
In bipolar, configuration the PAC194X/5X device can report also the negative values
measured for VSENSE and/or VBUS. However, it is recommended to connect the PAC
device SENSE+/- pins to the power rails such that the measured voltage values are
reported as positive values during the normal system operation. There are two reasons
for this:
• Windows E3 service supports only positive energy values and is not able by
design to control the channel polarity,
• Windows E3 service reads the energy data from the standard Energy Meter Inter-
faces (EMI) created by the PAC194X/5X device driver for the monitored rails. By
definition, the EMI interface allows only positive integer values.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 16 2021-2022
Microchip Technology Inc. and its subsidiaries
.
The PAC194X/5X device driver can also report the “signed” energy values, through a
different Microchip-defined software interface. User applications may use the alterna-
tive interface to collect the “signed” energy values.
Please note that the bipolar configuration reduces by half the least significant bit value
(the precision) of the measured voltage parameter (VSENSE or VBUS). To avoid the pre-
cision loss, the user may consider using the alternative FSR/2 configuration option.
This option is valid only if the electrical design of monitored power rail cannot induce
VSENSE or VBUS maximum voltage values higher than the alternative FSR/2 range
value.
2.5 PAC194X/5X-2 CONNECTION CONSIDERATIONS
PAC194X/5X-2 devices have two additional pins for each channel, VBUS+ and VBUS-.
The device driver implementation assumptions used for computing the values for
energy, power, rail voltage, current and other reported values, are:
• The SENSE+/- pins are connected to the sense resistor terminals, in the
Kelvin-connection configuration.
• VBUS-
pin is connected to the ground.
• VBUS+ pin connection options are:
- VBUS+ connected to the monitored power rail if the rail voltage cannot exceed
the channel VBUS full-scale range.
- VBUS+ connected to a power rail voltage divider (for example a resistive
voltage divider) if the rail voltage is higher than channel VBUS full-scale range.
• The ratio between the power rail voltage and the voltage measured as VBUS is a
constant factor used by the device driver to compute the real power rail voltage,
energy, and power. During the device initialization phase the device driver
acquires the VBUS multiplication factor from a dedicated ACPI BIOS DSM
function.

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 17
Chapter 3. ACPI BIOS Integration
Over and above any integration guidance provided in this document, OEMs and
system integrators are responsible for creating a valid ACPI BIOS that accurately
reflects their hardware platform. This includes the details of how the PAC194X/5X
devices are configured and connected in the system.
The guidance provided in this chapter is limited to describing the details that are
necessary to integrate the PAC194X/5X devices into a system running the Windows 10
or Windows 11 operating systems and the PAC194X/5X device driver.
Appendix A. “Sample ACPI ASL PAC194X/5X Device Definition” of this document
contains an example ACPI device definition, written in ACPI Source Language (ASL).
The example illustrates how a PAC194X/5X needs to be integrated into the ACPI BIOS.
Please refer to Appendix A example when reading this section.
Appendix B. “Testing the PAC194X/5X ACPI Integration” of this document provides
an example of easily available tools and the process to follow in order to quickly test
the PAC194X/5X integration into the system, without replacing the BIOS firmware in
the system Flash.
3.1 PAC194X/5X ACPI DEVICE
There are several per-device and per-channel initial configuration options included in
the system’s ACPI BIOS for each PAC194X/5X device that needs to be accessible to
the PAC194X/5X Windows device driver:
• The device I2C address.
• The name of the power rail to which a device channel is connected.
• The value of the sense resistor connected to each device channel (RSENSE).
• EMI enable/disable flags, indicating for which channels the device driver must
create the Energy Meter Interface (EMI). The channels without EMI interface may
be referred as “private channels”.
• Polarity and scale range settings for each channel.
• The device Active mode (full speed) and Idle mode (low power) data sampling
frequencies.
• The device driver “Refresh watchdog” timer interval duration.
• The VBUS multiplication factor for each channel.
For each PAC194X/5X device, the system’s ACPI BIOS provides a DSM function that
device drivers can call to retrieve the configuration option values. The PAC194X/5X
device driver uses the DSM functions for the device initial configuration. Some of the
configuration options can also be changed during the system runtime by the user
applications, using special driver functions. But, a system reboot reverts the PAC
device configuration to the ACPI BIOS initialization options.
The OEM/system integrator is responsible for creating a proper ACPI BIOS device
specific configuration for each PAC194x/5x device integrated in the system.
Appendix A. “Sample ACPI ASL PAC194X/5X Device Definition” contains an
example of ACPI ASL code for one PAC194X/5X device. This example may be copied,
multiplied and adapted for the customer system.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 18 2021-2022
Microchip Technology Inc. and its subsidiaries
As part of the PAC194X/5X device definition, a DSM control method that corresponds
to the Universal Unique Identifier (UUID), 721F1534-5D27-4B60-9DF4-41A3C4B7-
DA3A must be included, as shown in the example. This UUID is reserved to Microchip
PAC194X/5X devices and must not be changed. The PAC194X/5X device driver relies
on the DSM control method identified by this UUID.
There are 8 functions (0 to 7) implemented by the current version of the DSM (Revision
0).
DSM Function 0
As required by ACPI, the DSM Function 0 returns an integer value representing a
bit-mask which indicates the functions supported by this DSM. For example, a value of
1 on the second least significant bit, bit 1, indicates that the Function 1 is supported.
Hence, the returned bit-mask value is 0xFF for the DSM revision 0.
DSM Function 1
DSM Function 1 returns a set of four strings that provides for each device channel the
name of the power rail to which that channel is connected. The first string is associated
to channel 1. The PAC194X/5X accepts any arbitrary name strings. However, for the
channels that report energy data to the Windows E3 module (through EMI interfaces)
the supplied power rail names cannot be arbitrary. E3 needs to associate the power
rails data with the system’s main hardware components. Therefore, the power rail
names must be formed using predefined string tokens, according to the Win-
dows-defined EMI power rail taxonomy rules. Please refer to Microsoft supplied docu-
mentation for the detailed description of the power rail naming rules.
The PAC194X/5X driver also accepts empty strings for the power rail names. The
device driver also performs all the data acquisition and processing for the unnamed
channels but does not create the standard EMI interfaces for them, so the energy data
is not accessible to the Windows E3 module. Such channels are referred to as “private
channels”. The private channels data can be queried by the user applications using the
PAC194X/5X driver's device control interface IOCTL functions.
DSM Function 2
DSM Function 2 returns a buffer of four positive integer values representing the chan-
nel sense resistor (RSENSE) values expressed in microohm units. The first value is
associated to channel 1.
Zero value can be assigned to an RSENSE channel to indicate that the channel is not
used (not connected to a power rail) or can be ignored. The PAC194X/5X device driver
turns the channel OFF in the device control register and performs no data processing
for the unused channel (this reduces the PAC194X/5X device own power consumption
and the system CPU processing load).
OEMs and systems integrators must take great care in properly configuring the names
and the RSENSE values for the power rails because both the Windows E3 and the
PAC194X/5X device driver rely on these values being correct. There is no way for the
device driver to know if a given power rail name is valid, or, more importantly, to know
if the indicated channel is connected to the specified power rail.
DSM Function 3
DSM Function 3 returns an integer value representing a bit-mask which indicates for
what channels the PAC194X/5X device driver may create EMI interfaces. The Most
Significant bit (MSb) of the bit-mask is representing channel 1. The device driver com-
bines this information with the information returned by DSM Function 1 to determine if
the EMI interface can be created for a certain channel:
• EMI interface requires a non-empty string assigned for the power rail name, other-
wise the channel is kept private.
• If a mask bit value is cleared, the associated channel is kept “private”, the EMI

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 20 2021-2022
Microchip Technology Inc. and its subsidiaries
Please note that the device driver uses the DSM Function 7 only if the device is iden-
tified as a low-side type (PAC194X/5X-2), based on the device PRODUCT ID register
value.
TABLE 3-1: PAC194X/5X ACPI CONFIGURATION PARAMETERS SUMMARY
Parameter Type Valid Values Comments
UID Integer ≥1 Each PAC device in the system must have
a unique UID.
I2C 7-bit Device Address Integer See the “Address Select
Resistor” table in the device
datasheet.
• There are 16 possible values,
selected by ADDRSEL pin voltage
level.
• The table provides the supported I
2C
address values along with the value
of the resistor to be connected to
ADDRSEL pin.
I2C Connection Speed Integer Typical: 400000
Maximum: 3400000
• The connection speed in Hz.
• The speed must match the I
2C bus
controller supported speed.
I2C Controller Name String The ACPI name of the I2C
bus controller.
The I2C bus controller driver must have
Windows® SpbCx compliant driver.
Channel Names
(DSM Function 1)
String
(set of 4)
“”
Or non-empty string
• Configuration set layout:
{STR_CH1, STR_CH2, STR_CH3,
STR_CH4}
• STR_CHn: name string for channel
'n'. It should comply with Microsoft®
power rail / EMI naming taxonomy.
• STR_CHn = “”: channel 'n' has no EMI
interface (private channel).
RSENSE Values
(DSM Function 2)
Integer
(set of 4)
≥0 • Configuration set layout:
{RSENSE1, RSENSE2, RSENSE3, RSENSE4}
• RSENSEn: sense resistor value for
channel 'n', expressed in microohms
• RSENSEn = 0: channel 'n' is not used
EMI Enable/Disable
Bit-Mask
(DSM Function 3)
Bit-mask
(b3b2b1b0)
0x0 ~ 0xF • Bit-mask layout:
bCH1:bCH2
:bCH3:bCH4
• Bit values:
- bCHn = 1: EMI enabled for
channel 'n'
- bCHn = 0: EMI disabled for
channel 'n' (private channel)
VBUS/VSENSE
Polarities and
Full Scale Ranges
(DSM Function 4)
Integer
(set of 8)
0x0, 0x1, 0x2 • Configuration set layout:
{CFG_VS1, CFG_VS2, CFG_VS3,
CFG_VS4, CFG_VB1, CFG_VB2,
CFG_VB3, CFG_VB4}
• CFG_VSn: VSENSE configuration for
channel 'n'
• CFG_VBn: VBUS configuration for
channel 'n'
• Configuration values
(CFG_VSn/CFG_VBn):
-0x0 = unipolar
-0x1 = bipolar
-0x2 = half scale bipolar

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 22 2021-2022
Microchip Technology Inc. and its subsidiaries
NOTES:

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 23
Chapter 4. Driver Installation
4.1 PREREQUISITES
The following driver dependencies must be resolved before installing the driver:
• The PAC194X/5X devices are integrated in the host system.
• The I2C bus controller device driver is SPB Framework Extension (SpbCx)
compliant.
4.1.1 PAC194X/5X Integration in the Host System
4.1.1.1 ACPI ASL
Refer to the indications listed in Chapter 3. “ACPI BIOS Integration” and make the
necessary ACPI ASL changes to ensure that PAC194X/5X devices are enumerated by
the Microsoft Windows Device Manager.
4.1.1.2 VDD AND SLOW PINS
The device VDD pin should be connected to a system power rail that is not shut down
by the system standby or power-down sequence.
The SLOW pin should be connected to a signal that is driven high when the system
power is turned off.
The PAC194X/5X device driver supports the following SLOW pin use cases:
• A fail-safe mechanism that ensures that PAC devices are switched into the Slow
Sampling mode if the system crashes and is forcibly turned off by the operator or
by other fail-safe mechanism
• When the system power is turned back on, the SLOW pin transition high-to-low
saves into the device readable registers the data accumulated while the system
was off. The device driver can report the saved data to the user application for fur-
ther processing and analysis.
4.1.2 SpbCx Compliant I2C Bus Controller Device Driver
To access the I2C bus and communicate with the PAC devices, the PAC194X/5X
device driver uses the standard interface and protocol implemented by the Microsoft
Windows SpbCx framework. This implies that the I2C bus controller must also have a
Microsoft Windows device driver compliant with the SpbCx framework. Usually, such
driver is created by the I2C controller manufacturer and provided through Windows
installation kit or through Windows update.
CAUTION
Do not use the SLOW pin to change the device sampling rate during the normal system
operation. The PAC194X/5X device driver does not monitor the SLOW pin transitions
while the system is running. Therefore, if the user application reconfigures the device
into a non-adaptive sampling mode, any subsequent SLOW pin state activation would
cause incorrect data processing in the driver.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 24 2021-2022
Microchip Technology Inc. and its subsidiaries
.
4.2 INSTALLATION INSTRUCTIONS
There are several options to install the PAC194X/5X Microsoft Windows device driver:
• Install via Microsoft Windows update.
• Install using the Device Manager and the driver package downloaded from the
Microchip website.
• Use the DevCon utility and the driver package downloaded from the Microchip
website.
4.2.1 Install Using Microsoft Windows Update or Device Manager
For details about the driver installation through Microsoft Windows update or Device
Manager, refer to the following Microsoft article: “How to: Install and Update drivers in
Windows 10”.
4.2.2 Driver install using DevCon Utility
The DevCon utility is provided with the Windows Driver Kit (WDK).
1. Depending on the target system OS (32-bit or 64-bit), extract the following files
from the driver package:
• PAC194x_5x.sys
• PAC194x_5x.inf
• PAC194x_5x.cat
2. Copy the driver files and the DevCon utility on the target system.
3. Open in an elevated command prompt, change directory to the folder where the
driver files have been copied and execute the command:
devcon.exe update pac194x_5x.inf ACPI\MCHP1940
4.2.3 Verify the Installation
To verify that the PAC194X/5X device driver installation was successfully completed,
open the Device Manager and check if the PAC194X/5X devices are listed under the
“Microchip Energy Metering Devices” category and they are reported as working prop-
erly. See Figure 4-1 for more details.
FIGURE 4-1: Device Manager Displaying the PAC194X/5X Devices.

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 25
Chapter 5. Device Instantiation and Initialization
5.1 GETTING STARTED
During the Windows operating system startup, the PAC194X/5X devices connected to
the system’s I2C buses, are enumerated by the Windows ACPI driver (acpi.sys)
which plays the role of the bus driver. A PAC194X/5X device instance path is
ACPI\MCHP1940\<UID>, where UID is the device's unique ID value assigned in the
ACPI ASL code and MCHP1940 is the vendor hardware ID assigned for the
PAC194X/5X device family. The ACPI ASL code details specific for the PAC194X/5X
are described in Chapter 3. “ACPI BIOS Integration”.
The PAC194X/5X device driver is a Kernel-Mode Driver Framework (KMDF) function
driver which is instantiated by the Windows PnP Manager whenever the ACPI driver
enumerates the devices with the Hardware ID ACPI\MCHP1940.
In the device initialization stage, the PAC194X/5X device driver invokes the device's
ACPI BIOS Device Specific Method (DSM) which is identified by the Universal Unique
ID (UUID) 721F1534-5D27-4B60-9DF4-41A3C4B7DA3A. The information returned
by device's DSM is used to setup the initial configuration for a subset of device features
which affect the data processing algorithms implemented by the driver:
• Channel name – the name of the power rail monitored by the channel:
- The driver creates EMI device interfaces for all the named channels. For
details, refer to the following Microsoft article: Energy Meter Interface. The
Windows E3 service can use the data exported by the EMI interfaces if their
names are compatible with Windows EMI power rail taxonomy.
- If the channel name is an empty string, the driver does not create an EMI. The
data accumulated in the device for that channel is still collected, processed
and reported through the PAC194X/5X driver's device control interface cre-
ated for each PAC194X/5X device (the channel is referred to as private chan-
nel).
• RSENSE values – the value of the sense resistor for each channel, expressed in
microohms.
- The resistor value is used for the energy calculations and must be an integer,
positive value.
- The RSENSE = 0 indicates a channel which is not connected to a power rail.
No EMI interface is created, and the driver reports no data for this channel.
• EMI enable/disable bit mask – indicates for which named channels the driver will
create an EMI interface.
• VSENSE polarity, VBUS polarity and full-scale range configuration for each channel.
- If any of the configuration values is invalid the driver reports the
STATUS_ACPI_INVALID_DATA error to the kernel and stops the device
initialization process.
• The sampling frequencies to be configured when the device enters the Active
mode, respectively when the device enters the Idle mode.
- If any of the configuration values are invalid the driver reports the
STATUS_ACPI_INVALID_DATA error to the kernel and stops the device
initialization process.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 26 2021-2022
Microchip Technology Inc. and its subsidiaries
• REFRESH watchdog timer interval – the maximum time interval the driver allows
between consecutive device REFRESH commands when the system power state
is Working (S0).
- The driver automatically sends a REFRESH command to the device, resets
the timer, and collects all the device data when the timer expires. The timer is
also reset when the driver executes a REFRESH command to resolve a data
request or a device configuration change request received from Windows E3
service or from user applications.
- If the configuration value is invalid, the driver ignores it and uses the internally
hardcoded value of 240 seconds.
• VBUS multiplication factors for each channel of the PAC194X/5X-2 devices.
- The factor value is multiplied with the measured VBUS value to compute the
rail voltage only if the device is a PAC194X/5X-2 type, otherwise the value is
ignored.
- The device driver computes the rail voltage assuming that the multiplication
factor value is predetermined by the system designer as
1000 * (VRAIL/VBUS).
The driver uses the information returned by device's ACPI BIOS DSM in the following
situations:
• The operating system was powered-up from a full shutdown state: Soft Off – S5 or
Mechanical Off – G3 (Microsoft article System Power States describes the system
power states from the Windows perspective).
• The PAC194X/5X device lost the power while the operating system transitioned
through a low-power state (the PAC device POR has been detected).
• The operating system was Restarted.
There are also PAC194X/5X features for which the initial configuration is not affected
by device's ACPI BIOS DSM:
• The configuration option is hardcoded in the driver, or
• The device driver preserves the feature configuration as is (it may be the default
configuration option set by the last device POR or it may be the configuration
selected by the user in the previous operating system running session).
Section 5.2 “Device Configuration” provides details about the initial configuration
and about the runtime change options for the device features.
5.2 DEVICE CONFIGURATION
Summarized below is the list of PAC194X/5X device features controlled by the Win-
dows device driver. The list indicates the initial configuration and the configuration
options for the user.
• I2C/SMBus™ interface is configured as I2C
- Hardcoded configuration. SMBus option is not supported currently by
Windows SPB driver framework.
- No user runtime control supported; the driver has exclusive control.
• SAMPLE_MODE – the data sampling mode and frequency
- Initial configuration: adaptive accumulation mode with sample frequency
values provisioned by ACPI BIOS DSM for both the Active and the Idle device
running states.
- The user has runtime control through device driver's control interface.
• SLOW/ALERT1 pin is configured as SLOW
- Hardcoded configuration. Chapter 2. “Hardware Integration” presents the
SLOW pin connection options.

Device Instantiation and Initialization
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 27
- No user runtime control supported; the driver has exclusive control.
• Limited REFRESH_V command triggered on Slow signal transition (latch the data
into the readable registers).
- Hardcoded configuration.
- No user runtime control supported; the driver has exclusive control.
• GPIO/ALERT2 pin configuration
- Initial configuration: general-purpose input pin, hardcoded in the driver.
- The user has runtime control through device driver's control interface:
- Read the pin input value.
- Change the pin configuration to general-purpose output and control the output
value.
- Change the pin configuration to ALERT pin and select which alert type can acti-
vate the pin.
• Channel ON/OFF configuration
- Initial configuration: all the channels are enabled (ON) except for the channels
with 0Ω sense resistors, as indicated by the sense resistor values provisioned
by ACPI BIOS DSM.
- The user has runtime control through device driver's control interface.
- Only the channel with no EMI interface can be disabled.
- The driver creates the EMI interface for the channel based on the ACPI BIOS
DSM provisioned information: the channel name and the EMI Enable/Disable
bitmask.
• Channel VSENSE polarity, VBUS polarity and full-scale range (FSR) configuration
- Initial configuration: according to the values provisioned by the ACPI BIOS
DSM.
- The user has runtime control through device driver's control interface.
• Accumulators configuration
- Initial configuration: Power accumulation, hardcoded in the driver.
- The user has runtime control through device driver's control interface. There
are two alternative options: VSENSE accumulation and VBUS accumulation.
• Limit registers threshold values
- Initial configuration: the device driver preserves the configuration as is. It may
be the default configuration from the last device POR, or the last user
selected configuration change.
- POR threshold for accumulator fullness: 15/16 full.
- POR threshold for Over Current (OC), Under Current (UC), Over Power (OP),
Over Voltage (OV), Under Voltage (UV): 0.
- POR threshold for the number of consecutive, limit exceeding samples required
to trigger the limit alert: 1.
- The user has runtime control through device driver's control interface.
• ALERT source enable/disable configuration
- Initial configuration: all device alert sources are disabled. The configuration is
hardcoded in the driver.
- The user has runtime control through device driver's control interface. The
user can enable or disable any alert source: conversion cycle complete, accu-
mulator fullness, OC, UC, OP, OV, UV.

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 28 2021-2022
Microchip Technology Inc. and its subsidiaries
NOTES:

PAC194X/5X
UEFI BIOS INTEGRATION AND
MICROSOFT® WINDOWS® 10
AND WINDOWS 11
DEVICE DRIVER USER’S GUIDE
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 29
Chapter 6. PAC194X/5X Device Driver Interfaces
6.1 INTRODUCTION
A device interface contains the device's symbolic link name which the user applications
can use to direct the Input/Output (I/O) requests into the device. When the driver cre-
ates the interface, it also associates an interface class GUID (the interface type identi-
fier).
The user application can use the SetupDiEnumDeviceInterfaces function call to
discover the interfaces belonging to a certain GUID class, and then use the
SetupDiGetDeviceInterfaceDetail function call to obtain the symbolic link
names of the devices. (The two SetupDi… functions mentioned in this paragraph are
implemented by setupapi.lib library).
Next, the user application can pass the device symbolic link names to the CreateFile
kernel function to open the device for I/O and receive the assigned file handle. To
request the device to perform an I/O operation, the user application can invoke the
DeviceIoControl kernel function, specifying the device file handle, the operation
IOCTL code (the input/output control code which identifies the requested operation)
and other operation specific parameters. Then, the kernel executes the device driver
function which translates the IOCTL request into device specific commands, handles
the device communication, processes the reported data and returns the results back to
the operation requester.
This chapter presents the class GUID and the IOCTL codes implemented by the
PAC194X/5X device driver for each type of interface it creates:
•Energy Meter Interface
•Device Control Interface
6.2 ENERGY METER INTERFACE
The driver creates an EMI interface for each device channel provided that:
• the power rail monitored by the channel has a non-empty name,
• the EMI enable/disable bit-mask allows it.
For details regarding the EMI interface, refer to the Microsoft article Energy Meter Inter-
face and the file emi.h distributed with the Microsoft Windows Driver Kit.
The GUID for the EMI device interface class is:
• 45BD8344-7ED6-49cf-A440-C276C933B053

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 30 2021-2022
Microchip Technology Inc. and its subsidiaries
Table 6-1 lists the IOCTL control codes for the device I/O operations implemented by
EMI.
Table 6-2 describes the EMI I/O data structures and enumerations.
TABLE 6-1: EMI IOCTLS
IOCTL name Description
IOCTL_EMI_GET_MEASUREMENT Returns the current energy measurement and the time at
which the measurement was taken.
- Input: None
- Output: EMI_MEASUREMENT_DATA
IOCTL_EMI_GET_METADATA Returns the EMI metadata from a device.
- Input: None
- Output: EMI_METADATA
IOCTL_EMI_GET_METADATA_SIZE Returns the size of the EMI metadata object.
- Input: None
- Output: EMI_METADATA_SIZE
IOCTL_EMI_GET_VERSION Retrieves the EMI version supported by the device driver.
- Input: None
- Output: EMI_VERSION
TABLE 6-2: EMI I/O DATA STRUCTURES AND ENUMERATIONS
Topic Type Description
EMI_MEASUREMENT_DATA Output data structure Reported by IOCTL_EMI_GET_MEASUREMENT, provides the
energy measurement and the time when the measurement
was taken.
- Energy unit: 1 pWh
- Timestamp unit: 100 ns
- Energy and timestamp are 64-bit unsigned integer
values.
EMI_MEASUREMENT_UNIT Enumeration Represents the available set of measurement units for the
energy reported by IOCTL_EMI_GET_MEASUREMENT
-EMI_VERSION_V1 implements only the pWh unit.
EMI_METADATA IOCTL_EMI_GET_METADATAOutput data structure Reported by , provides infor-
mation about:
- The metering device hardware model and revision.
- The metered power rail name.
EMI_METADATA_SIZE IOCTL_EMI_GET_METADATA_SIZEOutput data structure Reported by , provides
the size of the EMI_METADATA structure.
EMI_VERSION IOCTL_EMI_GET_VERSIONOutput data structure Reported by , provides the EMI
version supported by this device driver.
- PAC194X/5X device driver implements
EMI_VERSION_V1 specification.

PAC194X/5X Device Driver Interfaces
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 31
6.3 DEVICE CONTROL INTERFACE
The PAC194X/5X device driver creates one control interface for each enumerated
PAC194X/5X device. Compared to the EMI interface, the device control interface
accepts the IOCTL_PAC194X5X_* requests, and provides users with access to much
more data and device configuration options:
• All the measured values (VBUS,VSENSE and many more in addition to the accumu-
lated energy)
• Data for all the channels, including the channels with no EMI interface
• Device-level and channel-level configuration options (sampling mode, channel
polarity, channel ON/OFF, alert limits)
• The I2C/SMBus communication options, the SLOW/ALERT1 pin configuration
options and the limited REFRESH configuration options are not accessible for the
user.
• The channel ON/OFF control and the channel accumulator configuration options
are allowed only if the channel has no EMI interface.
The GUID for the Device Control interface class is:
• 2DF42D48-4C09-453A-A05F-8A48F8FBB415
The detailed C definition of the Device Control interface (IOCTL codes, data structures
and data types) is listed in Appendix C. “PAC194X/5X Device Control Interface”.
Table 6-3 and Table 6-4 provide a summary description of the IOCTL operations and
their input/output data structures
Table 6-3 lists the IOCTL control codes for the device I/O operations implemented by
Device Control interface.
NOTICE
Some device or channel configuration options are blocked by the driver either tempo-
rarily or permanently.
TABLE 6-3: DEVICE CONTROL IOCTLs
IOCTL Name Description
IOCTL_PAC194X5X_GET_INTERFACE_REVISION Returns the device control interface revision number.
New driver versions may implement new I/O operations or
change the behavior of the existing ones. This IOCTL can
help the user application determine which control interface
IOCTLs are implemented by the PAC194X/5X driver cur-
rently installed in the host system.
- Input buffer: none
- Output buffer: PAC194X5X_GET_INTF_REV
Note:
- The current interface revision number is 0x01
IOCTL_PAC194X5X_GET_DEVICE_INFO_SIZE Returns the size allocation requirements for the buffer
that must hold the device info data structure returned by
IOCTL_PAC194X5X_GET_DEVICE_INFO operation.
- Input buffer: none
- Output buffer:
PAC194X5X_GET_DEVICE_INFO_SIZE

PAC194X/5X Device Driver User’s Guide
DS50003155B-page 32 2021-2022
Microchip Technology Inc. and its subsidiaries
IOCTL_PAC194X5X_GET_DEVICE_INFO Returns information about the device version and about the
channel connections (rail names, sense resistors, connection
status).
- Input buffer: none
- Output buffer: PAC194X5X_GET_DEVICE_INFO
IOCTL_PAC194X5X_GET_RSENSE_MICRO Returns the sense resistor values for all channels as
microohm units.
A value of zero is returned for the unconnected sense resis-
tors and for the channels which are not available on the
devices with less than four channels.
- Input buffer: none
- Output buffer: PAC194X5X_GET_RSENSE_MICRO
IOCTL_PAC194X5X_DATA_REFRESH Performs the update of the device driver software accumula-
tors using the REFRESH_V device command.
- Input buffer: none
- Output buffer: none (zero bytes returned)
IOCTL_PAC194X5X_DATA_REFRESH_RESET Performs the update of the device driver software accumula-
tors using the REFRESH device command. Depending on
the value of the input flag parameter, this request can also
clear (reset to 0) the software accumulators for the channels
without EMI interfaces.
- Input buffer: PAC194X5X_REFRESH_FLAGS
- Output buffer: none (zero bytes returned)
IOCTL_PAC194X5X_DATA_REFRESH_RESET_-
GLOBAL
Performs a global update of the device driver software accu-
mulators for all the PAC194X/5X devices in the system.
Depending on the value of the input flag, this request can
also clear (reset to 0) the software accumulators for the
channels without EMI interfaces.
- Input buffer: PAC194X5X_REFRESH_FLAGS
- Output buffer: none (zero bytes returned)
Note:
Windows® SpbCx framework does not support the I
2C gen-
eral call address (0x00), therefore the driver cannot imple-
ment this operation request using the REFRESH_G device
commands. Instead, the driver implements this request send-
ing sequential REFRESH commands to all the devices in the
system.
IOCTL_PAC194X5X_GET_DATA Returns the measured values (e.g. voltage, power, accumu-
lated power, sample count) and the timestamp when the
measurement was taken.
- Input buffer: none
- Output buffer: PAC194X5X_DATA
IOCTL_PAC194X5X_GET_LAST_SLOW_DATA Returns the measured values (voltage, power, accumulated
power, sample count) latched in the device's readable regis-
ters by the last SLOW signal High-to-Low transition (SLOW
limited REFRESH) caused by the system power state transi-
tion to Working (S0) from other non-powered state.
- Input buffer: none
- Output buffer: PAC194X5X_LAST_SLOW_DATA
TABLE 6-3: DEVICE CONTROL IOCTLs (CONTINUED)
IOCTL Name Description

PAC194X/5X Device Driver Interfaces
2021-2022
Microchip Technology Inc. and its subsidiaries
DS50003155B-page 33
IOCTL_PAC194X5X_GET_OVERFLOW Returns the status of the channel accumulators fullness limit
overflow ACC_OVF and the accumulator count fullness limit
overflow ACC_COUNT bits from ALERT_STATUS register.
Depending on the value of the input flag, this request can
also clear (reset to 0) the ACC_OVF and ACC_COUNT flags.
- Input buffer: PAC194X5X_GET_OVERFLOW
- Output buffer: PAC194X5X_GET_OVERFLOW
IOCTL_PAC194X5X_GET_CTRL Returns the content of the device registers CTRL,
CTRL_ACT, CTRL_LAT
- Input buffer: none
- Output buffer: PAC194X5X_GET_CTRL
IOCTL_PAC194X5X_SET_CTRL Provides limited user control over some device configuration
bits from CTRL register: SAMPLE_MODE, CHx_OFF, GPI-
O_ALERT2. The driver rejects as invalid parameters the
reserved or the unsupported SAMPLE_MODE values and
ignores the CHx_OFF configuration requests which may
affect channels with open EMI interface. The driver activates
the new device configuration using a REFRESH command.
- Input buffer: PAC194X5X_SET_CTRL
- Output buffer: none (zero bytes returned)
Notes:
- Change requests for the CHx_OFF bits of the
channels with EMI interfaces are ignored.
- Change requests for SLOW_ALERT1 are ignored.
- The Reserved or the unsupported values for
SAMPLE_MODE bits are rejected, with invalid
parameters error code
STATUS_INVALID_PARAMETER.
- SAMPLE_MODE setting to non-adaptive
accumulation mode is not supported together with
GPIO_ALERT2 setting as SLOW pin. The change
requests are rejected
(STATUS_INVALID_PARAMETER error).
- SAMPLE_MODE setting to Single Shot, Single Shot
8x and SLEEP is rejected for the device with EMI
interfaces (STATUS_INVALID_PARAMETER error).
IOCTL_PAC194X5X_GET_CHANNEL_OFF Returns the content of the channel ON/OFF configuration
bits from CTRL, CTRL_ACT and CTRL_LAT registers
- Input buffer: none
- Output buffer: PAC194X5X_GET_CHANNEL_OFF
IOCTL_PAC194X5X_SET_CHANNEL_OFF Provides limited user control over CHn_OFF bits from CTRL
register. The driver activates the new device configuration
using a REFRESH command.
- Input buffer: PAC194X5X_CHANNEL_OFF
- Output buffer: none (zero bytes returned)
Notes:
- The only accepted values are 0 (ON) and 1 (OFF)
for each CHx_OFF input parameter structure field,
otherwise the request is rejected
(STATUS_INVALID_PARAMETER error).
- The driver ignores the change requests to OFF for
the channels with EMI interfaces.
TABLE 6-3: DEVICE CONTROL IOCTLs (CONTINUED)
IOCTL Name Description
Produkt Specifikationer
Mærke: | Microchip |
Kategori: | Ikke kategoriseret |
Model: | PAC194X/5X |
Har du brug for hjælp?
Hvis du har brug for hjælp til Microchip PAC194X/5X stil et spørgsmål nedenfor, og andre brugere vil svare dig
Ikke kategoriseret Microchip Manualer
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
17 Juni 2025
Ikke kategoriseret Manualer
- Jumbo
- Globe
- Ygnis
- ELTA Music
- KM-fit
- PoLabs
- Alpha Tools
- STANDARD
- Syrp
- NutriBullet
- Federal Signal
- Ernitec
- Robust
- Soma
- Revlon
Nyeste Ikke kategoriseret Manualer
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025
19 Juni 2025