Professional Documents
Culture Documents
I2C 1 I2C 2
Resource Hub
IHV
SoC Vendor
Microsoft
Ambient Light Bluetooth
Accelerometer Touchpad
Sensor Radio
UMDF Class Extension Driver (e.g. Sensor Class Extension)
Physical Hardware
Device Driver
Physical Hardware
Device Driver
Physical Hardware
UMDF V2 Sensors Class Extension
ADXL345Acc Driver
(UMDF V2.0)
SpbCx.sys GpioClx.sys
ADXL345Acc Peripheral
Sharkscove Minnowboard Qualcomm Raspberry Pi 2
Max Reference
Board
OS Architecture X86 X86, x64 ARM ARM
Operating System SKU Supported Desktop, IOT Desktop, IOT Mobile, IOT IOT
GPIO Capabilities 2 dedicated GPIO, 3 dedicated GPIO @
Supported 40 Pins
- # available GPIO Lines 6 assigned 1.8-4.2V 3.3V
sensor.AddI2CSerialBus(
SlaveAddress: 0x53,
Mode: SlaveMode.ControllerInitiated,
ConnectionSpeed: 400 * 1000,
addressmode: AddressMode._7Bit,
controllername: @"\_SB_.I2C3");
sensor.AddGPIOInterrupt(
Type: InterruptType.Level,
ActiveLevel: InterruptActiveLevel.ActiveHigh,
Shared: SharingLevel.Exclusive,
PinConfiguration: PinConfiguration.Down,
DebounceTimeout: 0,
PinNumber: 1,
Source: @"\_SB_.GPO2");
platform.WriteAsl();
ASL is difficult to debug, but with ACPIGenFx developers will experience fewer bugs at runtime.
INF
[Version]
Signature = "$Windows NT$"
Class = Sensor
ClassGuid= {5175D334-C371-4806-B3BA-71FD53C9258D}
Provider=%ManufacturerName%
CatalogFile=ADXL345Acc.cat
DriverVer=
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%DeviceName%=MyDevice_Install, ACPI\ADXL0345
[Strings]
ManufacturerName="Me"
DeviceName="ADXL345Acc Device"
[Version]
Signature = "$Windows NT$"
Class = Sensor
ClassGuid= {5175D334-C371-4806-B3BA-71FD53C9258D}
Provider=%ManufacturerName%
CatalogFile=ADXL345Acc.cat
DriverVer=
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%DeviceName%=MyDevice_Install, ACPI\ADXL0345
[Strings]
ManufacturerName="Me"
DeviceName="ADXL345Acc Device"
[Version]
Signature = "$Windows NT$"
Class = Sensor
ClassGuid= {5175D334-C371-4806-B3BA-71FD53C9258D}
Provider=%ManufacturerName%
CatalogFile=ADXL345Acc.cat
DriverVer=
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%DeviceName%=MyDevice_Install, ACPI\ADXL0345
[Strings]
ManufacturerName="Me"
DeviceName="ADXL345Acc Device"
Windows Sample Driver enabling the Tips and Tricks
following developer scenarios: 1. Device you intend
Opens a handle to the SPB controller, use to load SpbTestTool
the SPB interface from a KMDF driver, and driver on must be
employ GPIO passive-level interrupts.
It implements a set of commands for
defined in ACPI (e.g
ACPI\HWID1234).
communicating with a peripheral device to
aid in debugging. 2. See spbtesttool.asl
References: in the source code
https://code.msdn.microsoft.com/windo for a complete
wshardware/SpbTestTool- example.
adda6d71#content
Windows Apps and Low Power Buses
Provide Windows Apps access to low level I2C, SPI
and GPIO devices for IOT scenarios and
diagnosability.
ACPI will re-enumerate devices below the notified device (e.g. ALS,),
removing or adding Windows device nodes as appropriate.
Windows will load drivers, or ADD_DEVICE to already loaded drivers.
Troubleshooting
WPP Tracing
Topic: How to debug loading and
runtime errors in your driver
Design
Trace GUID (in SensorsTrace.h)
Sensor device unique GUID (in
device.cpp)
<Day 2>
15:00 Testing with the Hardware Lab Kit Lab: Sensor Driver on Sharks Cove
16:10 Intro to Driver Signing, Distribution, Servicing Lab: Testing with the Hardware Lab Kit
17:20 Lab: Testing with the Hardware Lab Kit
<Day 3>
Some information relates to pre-released product which may be substantially modified before its commercially
released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ISSUE: HIDI2C driver is not loaded in Device Manager for
the DEVICE (I2C Peripheral), but I2C Controller driver is
loaded
REASON: Invalid ASL Code for HOST or DEVICE. Errors in
ASL manifest as:
The HIDI2C driver will not load (INF match failed - see
setupapi.dev.log)
The HIDI2C driver will load with Error Code 10. (More
details to follow).
OEM must ensure highlighted items are valid
_HID (Vendor specific) and _CID ( fixed to PNP0C50)
I2C Controller and Device characteristics are accurate
HID Descriptor Address is correctly Identified for that specific
DEVICE
Please pay special attention to the following
GPIO Interrupt is correctly identified and marked as Exclusive,
Level, ActiveLow
ISSUE: HIDI2C driver is Error Code 10 in Device
Byte Field VALUE Notes
Offset (HEX)
Manager
REASON: If the DEVICE has an invalid HID 0 wHIDDescLength 00 18 Fixed
Validate HID Descriptor Address entry in ASL. 8 wInputRegister TBD Device IHV must set correctly
Observe I2C traffic to DEVICE to see if HOST is 10 wMaxInputLength TBD Device IHV must set correctly
requesting correctly.
12 wOutputRegister TBD Device IHV must set correctly
Did the HOST retrieve correct response to Reset
(HIR) from the DEVICE. If not, focus on the 14 wMaxOutputLength TBD Device IHV must set correctly
Validate entries in Byte Offset 16 and 18 of HID Descriptor 18 wDataRegister TBD Device IHV must set correctly
Validate the DEVICE responded correctly to HIR request
(asserted GPIO Interrupt + 0x00 0x00 in Input Register) 20 RESERVED 00 00 00 00 Fixed
Some information relates to pre-released product which may be substantially modified before its commercially
released. Microsoft makes no warranties, express or implied, with respect to the information provided here.