320 likes | 946 Views
HW-251T. Introducing low-power buses for Windows 8. John Felkins Program Manager Microsoft Corporation. Agenda. Why we need low-power buses The new picture of system connectivity Introducing each “new” bus How to use low-power buses to integrate a sensor
E N D
HW-251T Introducing low-power buses for Windows 8 John Felkins Program Manager Microsoft Corporation
Agenda • Why we need low-power buses • The new picture of system connectivity • Introducing each “new” bus • How to use low-power buses to integrate a sensor You’ll leave with an example of how to • Write, integrate and test a simple sensor on I2C
Enable systems to reduce power consumption by using low-power peripheral buses.
The bus connectivity challenge • Many system designs, many form factors • Peripherals may use several low power buses • Peripheral drivers should be portable, like they are on standardized buses • Enable power and cost savings
Our solution: You write your driver once, and we take care of the per-platform configurations.
demo One driver – two different tablets
Connectivity inside Windows 7 PCs Graphics System Chipset PCI Bluetooth Camera Touchscreen USB Sensors, buttons, lights, etc. Embedded Controller LPC/SMbus
Device connections with low-power buses System Chipset I2C 2 GPIO I2C 1 UART Accelerometer Ambient Light Sensor Touch Screen Bluetooth Radio
Device enumeration in Windows 8 Ambient Light Sensor Accelerometer Touch Screen Bluetooth Radio UART I2C I2C GPIO IHV SoC Vendor ACPI Microsoft Firmware Firmware
Connectivity with low-power buses Ambient Light Sensor Touch Screen Bluetooth Radio Accelerometer Resource Hub GPIO UART I2C I2C IHV SoC Vendor ACPI Microsoft Firmware Firmware
The APIs for each bus • GPIO • New READ PINS and WRITE PINS IOCTLs for IO Connections • Existing CONNECT and DISCONNECT interface for Interrupt Connections • I2C & SPI • Simple Peripheral Bus (SPB) Interface • Read, write, lock, unlock, sequence • HSUART (Serial) • Serial interface • No COM ports
How devices work on low power buses • The chipset vendor writes bus controller drivers for their platform • The peripheral driver writer drivers using the GPIO, SPB, Serial, and Interrupt APIs • The system builder connects the dots in ACPI • Windows helps with cross-driver dependencies, power, enumeration, reliability and more
SpbAccelerometer’s wiring diagram System on Chip I2C Controller GPIO Controller ADXL345 Accelerometer I2C (addr 0x1d) Interrupt
SpbAccelerometer’s driver stack UMDF Sensor Class Extension SpbAccelerometer Driver KMDF Simple Peripheral Bus API Windows Driver Interrupts GPIO Controller Driver (3rd party) I2C Controller Driver (3rd Party) Sensor Hardware (I2C + GPIO)
Ingredients of SpbAccelerometer • User mode Sensor Driver • Implements the Sensor Class Extension to provide sensor data to Windows • Accesses SPB APIs to read/write data to the I2C bus • Uses a passive level GPIO user mode interrupt for detecting new motion data
ACPI description for SpbAccelerometer • Device(ACCL) { Name (_HID, "SpbAccelerometer") Name (_CID, "Sensor") Name (_UID, 0) Method(_CRS, 0x0, NotSerialized) { Name (RBUF, ResourceTemplate () { I2CSerialBus (AddressingMode7Bit, 400000, 0x1D, ControllerInitiated, "\\_SB.I2C3", , )GpioInt(ResourceConsumer, Level, ActiveHigh, Exclusive, 0, 0, "\\_SB.GPI1", ) {19} }) Return(RBUF) }} I2C3, Address 0x1d, 400kHz GPIO level interrupt on #19
What’s in the Windows Driver Kit (WDK) • SpbTestTool driver and app for I2C, SPI • SpbAccelerometer sample sensor driver on I2C • Bluetooth bus driver on UART • UART controller driver for PCs • SimDevice – a sample driver that consumes GPIO interrupt and IO resources
How to get started • Get I2C-capable hardware from one of our SoCpartners • Install Windows and the WDK • Get the platform drivers (I2C, GPIO, SPI, HSUART, etc) from the platform provider • Attach your peripheral, and write the appropriate ACPI to describe the peripheral (this can programmed into firmware or into the registry)
How to get started • Use SpbTestTool (for SPI, I2C) to see if you can read/write data from your device • This validates the electrical connection and ACPI configuration for I2C/SPI • Follow one of our WDK samples to write your driver
Recap • New low-power buses available for Windows 8 • One driver, one part – let ACPI and Windows handle the plumbing • Everything you need to get started is in the Windows Driver Kit
Related sessions • [HW-249T] Architecting and integrating sensor drivers • [HW-235T] Developing drivers in Visual Studio • [HW-255T] Integrating Bluetooth on low-power buses
Further reading and documentation • Developing, Testing, and Deploying Drivers • Windows Hardware Dev Center • Windows Dev Center • Contact info – simplebus@microsoft.com
thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.