Introducing low-power buses for Windows 8 9/22/2018 2:03 PM HW-251T Introducing low-power buses for Windows 8 John Felkins Program Manager Microsoft Corporation © 2010 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.
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.
Why Windows needs more buses
The inside today’s PC Standardized Buses PCI and USB Fast, powerful, enumerable Class drivers Proprietary Buses SMBus, LPC, etc Proprietary uses Proprietary drivers Simple Buses I2C, SPI, High speed UART, GPIO Often require embedded controllers and special firmware
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.
One driver – two different tablets demo One driver – two different tablets
The New Picture of System Connectivity
Connectivity inside Windows 7 PCs Graphics System Chipset PCI Bluetooth Camera Touchscreen USB Embedded Controller Sensors, buttons, lights, etc. LPC/SMbus
Device connections with low-power buses System Chipset I2C 1 GPIO I2C 2 UART Accelerometer Ambient Light Sensor Touch Screen Bluetooth Radio
Device enumeration in Windows 8 Accelerometer Ambient Light Sensor Touch Screen Bluetooth Radio I2C I2C UART GPIO IHV SoC Vendor ACPI Microsoft Firmware Firmware
Connectivity with low-power buses Accelerometer Ambient Light Sensor Touch Screen Bluetooth Radio Resource Hub I2C I2C GPIO UART IHV SoC Vendor ACPI Microsoft Firmware Firmware
Introducing each “new” bus
The “new” low power buses GPIO Used as interrupt or for general IO Buttons, switches, lights, system wake, etc Interrupts for SPB, serial, and other buses SPB I2C, SPI Up to 3.4Mbps for I2C, 160Mbps for SPI Wide variety of peripherals Input Radios Sensors Power management Serial High Speed UART Up to 20Mbps No COM ports Typically used for Bluetooth, GPS, and other radios
The APIs for each bus GPIO I2C & SPI HSUART (Serial) 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
Leading by example: how to integrate a sensor
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 I2C Controller Driver (3rd Party) GPIO 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 © 2010 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.
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 SoC partners 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
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 feedback http://bldw.in/SessionFeedback
9/22/2018 2:03 PM © 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. © 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.