The Shiny New I2C Slave Framework

Size: px
Start display at page:

Download "The Shiny New I2C Slave Framework"

Transcription

1 The Shiny New I2C Slave Framework Wolfram Sang Consultant/Renesas Kernel Team , ELCE15 Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 1 / 26

2 A typical I2C bus Rp Vdd SDA SCL Linux Master ADC Slave DAC Slave μc Slave 1 1 picture based on this one by Colin M.L. Burnett Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 2 / 26

3 The new era :) Rp Vdd SDA SCL Linux Ma./Sl. ADC Slave DAC Slave Linux Ma./Sl. 2 2 picture based on this one by Colin M.L. Burnett Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 3 / 26

4 Finally At this time, Linux only operates I2C (or SMBus) in master mode; you can t use these APIs to make a Linux system behave as a slave/device, either to speak a custom protocol or to emulate some other device. Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 4 / 26

5 Use cases data delivery (sensor like) configuration (codec like) embedded controllers (e.g. nvec) avoid multi-master Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 5 / 26

6 Data flow User Backend Driver Controller kernel driver, sysfs, char device,... I2C slave events IO registers Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 6 / 26

7 Driver side We need support from the I2C bus driver activating slave support in the core is not enough usually extension to the I2C master driver no slave only solutions please watch your PM settings a slave always needs to listen Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 7 / 26

8 Registering a slave static int rcar_reg_slave(struct i2c_client *slave) { struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter); if (priv->slave) return -EBUSY; if (slave->flags & I2C_CLIENT_TEN) return -EAFNOSUPPORT; pm_runtime_forbid(rcar_i2c_priv_to_dev(priv)); priv->slave = slave; rcar_i2c_write(priv, ICSAR, slave->addr); rcar_i2c_write(priv, ICSSR, 0); rcar_i2c_write(priv, ICSIER, SAR SSR); rcar_i2c_write(priv, ICSCR, SIE SDBS); } return 0; Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 8 / 26

9 Slave events Handler function ret = i2c_slave_event(slave, event, &val) links driver and backend val carries the data. It is bidirectional. usually called from interrupt context! Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 9 / 26

10 Slave events (master writes) I2C_SLAVE_WRITE_RECEIVED val = byte from master, ret = 0/-ERRNO S Addr+W A Data A/N... P I2C_SLAVE_WRITE_REQUESTED I2C_SLAVE_STOP val = unused, ret = 0 val = unused, ret = 0 Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 10 / 26

11 Slave events (master reads) I2C_SLAVE_READ_PROCESSED val = byte to master, ret = 0 S Addr+R A Data A/N... P I2C_SLAVE_READ_REQUESTED I2C_SLAVE_STOP val = byte to master, ret = 0 val = unused, ret = 0 Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 11 / 26

12 Slave interrupt handler I static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv) { u32 ssr_raw, ssr_filtered; u8 value; ssr_raw = rcar_i2c_read(priv, ICSSR) & 0xff; ssr_filtered = ssr_raw & rcar_i2c_read(priv, ICSIER); if (!ssr_filtered) return false; Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 12 / 26

13 Slave interrupt handler II /* address detected */ if (ssr_filtered & SAR) { /* read or write request */ if (ssr_raw & STM) { i2c_slave_event(priv->slave, I2C_SLAVE_READ_REQUESTED, &value); rcar_i2c_write(priv, ICRXTX, value); rcar_i2c_write(priv, ICSIER, SDE SSR SAR); } else { i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value); rcar_i2c_read(priv, ICRXTX); /* dummy read */ rcar_i2c_write(priv, ICSIER, SDR SSR SAR); } } rcar_i2c_write(priv, ICSSR, ~SAR & 0xff); Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 13 / 26

14 Slave interrupt handler III /* master sent stop */ if (ssr_filtered & SSR) { i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value); rcar_i2c_write(priv, ICSIER, SAR SSR); rcar_i2c_write(priv, ICSSR, ~SSR & 0xff); } Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 14 / 26

15 Slave interrupt handler IV /* master wants to write to us */ if (ssr_filtered & SDR) { int ret; } value = rcar_i2c_read(priv, ICRXTX); ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_RECEIVED, &value); /* Send NACK in case of error */ rcar_i2c_write(priv, ICSCR, SIE SDBS (ret < 0? FNA : 0)); rcar_i2c_write(priv, ICSSR, ~SDR & 0xff); Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 15 / 26

16 Slave interrupt handler V /* master wants to read from us */ if (ssr_filtered & SDE) { i2c_slave_event(priv->slave, I2C_SLAVE_READ_PROCESSED, &value); rcar_i2c_write(priv, ICRXTX, value); rcar_i2c_write(priv, ICSSR, ~SDE & 0xff); } } return true; Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 16 / 26

17 Backends are standard i2c drivers are normally matched to i2c clients are HW independent provide a callback to handle slave events Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 17 / 26

18 Backend driver I static int i2c_slave_8bit_seconds_slave_cb(struct i2c_client *client, enum i2c_slave_event event, u8 *val) { switch (event) { case I2C_SLAVE_READ_REQUESTED: case I2C_SLAVE_READ_PROCESSED: /* Always get the most recent value */ *val = get_seconds() & 0xff; break; case I2C_SLAVE_WRITE_REQUESTED: case I2C_SLAVE_WRITE_RECEIVED: case I2C_SLAVE_STOP: default: break; } } return 0; Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 18 / 26

19 Backend driver II static int i2c_slave_8bit_seconds_probe(struct i2c_client *client, const struct i2c_device_id *id) { return i2c_slave_register(client, i2c_slave_8bit_seconds_slave_cb); }; static int i2c_slave_8bit_seconds_remove(struct i2c_client *client) { i2c_slave_unregister(client); return 0; } Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 19 / 26

20 The read pointer problem... case I2C_SLAVE_READ_PROCESSED: /* The previous byte made it to the bus, get next one */ eeprom->buffer_idx++; /* fallthrough */ case I2C_SLAVE_READ_REQUESTED: spin_lock(&eeprom->buffer_lock); *val = eeprom->buffer[eeprom->buffer_idx]; spin_unlock(&eeprom->buffer_lock); /* * Do not increment buffer_idx here, because we don't know if * this byte will be actually used. Read Linux I2C slave docs * for details. */ break;... Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 20 / 26

21 Current status Drivers: RCar, (Tegra), ((Davinci)) Backend: EEPROM/memory simulator Devicetree: bindings clear \o/ Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 21 / 26

22 Address spaces Avoid address collisions. Enable loopbacks. Devicetree I2C_TEN_BIT_ADDRESS address space: 0xa000-0xa3ff I2C_OWN_SLAVE_ADDRESS address space += 0x1000 Example: reg = <(I2C_OWN_SLAVE_ADDRESS 0x42)>; Run time instantiation echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-1/new_device Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 22 / 26

23 Next steps more driver support more backends (if there is a user) no new features (unless there is a use case) Wolfram Sang (wsa@the-dreams.de) The Shiny New I2C Slave Framework , ELCE15 23 / 26

24 Thanks! <3 Renesas for funding this upstream solution Renesas Kernel Team especially Geert and Laurent for thorough review Uwe Kleine-König for in-depth discussions Andrey Danin for the Tegra slave implementation and nvec backend port Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 24 / 26

25 Demo! At the showcase this evening Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 25 / 26

26 The End Thank you for your attention! Questions? Comments? right now at the showcase this evening or anytime at this conference Wolfram Sang The Shiny New I2C Slave Framework , ELCE15 26 / 26

HiKey970. I2C Development Guide. Issue 01. Date

HiKey970. I2C Development Guide. Issue 01. Date Issue 01 Date 2018-03-11 2018. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of HiSilicon Technologies Co., Ltd.

More information

The I2C BUS Interface

The I2C BUS Interface The I 2 C BUS Interface ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.S.M. 1 Course What is I 2 C? I

More information

DMA safety in buffers for Linux Kernel device drivers

DMA safety in buffers for Linux Kernel device drivers DMA safety in buffers for Linux Kernel device drivers Wolfram Sang, Consultant / Renesas 23.10.2018, ELCE2018 Wolfram Sang, Consultant / Renesas DMA safety in buffers 23.10.2018, ELCE2018 1 / 23 I2C &

More information

I2C. I2C, sometimes IIC or I 2 C, stands for inter IC. 2-line bus, clock (SCL) and data (SDA) Devices individually addressable

I2C. I2C, sometimes IIC or I 2 C, stands for inter IC. 2-line bus, clock (SCL) and data (SDA) Devices individually addressable I2C I2C, sometimes IIC or I 2 C, stands for inter IC 2-line bus, clock (SCL) and data (SDA) Devices individually addressable Not sensitive to clock speed No bus power contention Sources http://www.robot-electronics.co.uk/i2c-tutorial

More information

I2C Transaction Summary for NXP LPC Microcontrollers

I2C Transaction Summary for NXP LPC Microcontrollers I2C Transaction Summary for NXP LPC Microcontrollers March 5, 2011 Todd Comins Document Created with Google Docs BETA Introduction... 0 I2C Transaction Summary... 4 Symbol Key... 6 Quick Command... 7 Send

More information

Embedding it better... µtasker Document. µtasker I 2 C Support, Demo and Simulation

Embedding it better... µtasker Document. µtasker I 2 C Support, Demo and Simulation Embedding it better... µtasker Document µtasker I 2 C Support, Demo and Simulation utasker_i2c.doc/0.06 Copyright 2017 M.J.Butcher Consulting Table of Contents 1. Introduction...3 2. Example - EEPROM...3

More information

Test Case: Linux I2C driver testing - Slave Mode. 1. Test Case ID: TC_I2C_Lin_004

Test Case: Linux I2C driver testing - Slave Mode. 1. Test Case ID: TC_I2C_Lin_004 Contents Test Case: Linux I2C driver testing - Slave Mode... 2 1. Test Case ID: TC_I2C_Lin_004... 2 2. Description:... 2 3. Hardware Setup Details:... 2 4. Software Setup Details:... 2 5. Test Execution

More information

Developer s Diary: It s about time!

Developer s Diary: It s about time! ... Developer s Diary: It s about time! Wolfram Sang 28.10.2011, ELCE 2011 Wolfram Sang (Pengutronix) It s about time! 28.10.2011, ELCE 2011 1 / 23 Overview...1...2 Timeouts Wolfram Sang (Pengutronix)

More information

Introduction to Linux kernel driver programming + i2c drivers

Introduction to Linux kernel driver programming + i2c drivers Introduction to Linux kernel driver programming + i2c drivers Introduction to Linux kernel driver programming: i2c drivers The Linux kernel device model Authors and license Authors Michael Opdenacker (michael@bootlin.com)

More information

I + I2C = I3C, what s hiding in this additional I

I + I2C = I3C, what s hiding in this additional I ELC 2018 I + I2C = I3C, what s hiding in this additional I Boris Brezillon boris@bootlin.com Copyright 2004-2018, Bootlin. Creative Commons BY-SA 3.0 license. Formerly Free Electrons Corrections, suggestions,

More information

AMP DISPLAY INC. SPECIFICATIONS AMP DISPLAY INC 9856 SIXTH STREET RANCHO CUCAMONGA CA TEL: FAX:

AMP DISPLAY INC. SPECIFICATIONS AMP DISPLAY INC 9856 SIXTH STREET RANCHO CUCAMONGA CA TEL: FAX: AMP DISPLAY INC. SPECIFICATIONS CUSTOMER CUSTOMER PART NO. AMP PART NO. AP-CTP035A0RSI3E00000 APPROVED BY DATE Approved For Specifications Approved For Specifications & Sample AMP DISPLAY INC 9856 SIXTH

More information

Linux Kernel Drivers for I 2 C-manageable High Precision Power Source Based on ISL22317 and PCA9536 Chips

Linux Kernel Drivers for I 2 C-manageable High Precision Power Source Based on ISL22317 and PCA9536 Chips Linux Kernel Drivers for I 2 C-manageable High Precision Power Source Based on ISL22317 and PCA9536 Chips Evgeniy Kravtsunov, Andrey Kuyan, Sergey Radchenko, Andrey Kozlov Moscow Center of SPARC Technologies

More information

. Making the Linux Kernel better. Wolfram Sang , FOSDEM 14

. Making the Linux Kernel better. Wolfram Sang , FOSDEM 14 Making the Linux Kernel better (without coding) Wolfram Sang Consultant 122014, FOSDEM 14 Wolfram Sang (wsa@the-dreamsde) Making the Linux Kernel better 122014, FOSDEM 14 1 / 20 About me Linux Kernel consultant

More information

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology. Introduction. Target Device. I 2 C Bus Interface (RIIC) Module Using Firmware Integration Technology Introduction APPLICATION NOTE R01AN1692EJ0231 Rev. 2.31 This application note describes the I 2 C bus interface (RIIC) module using

More information

VZ8(6)9 rev B I2C communication quick manual. SGX Sensortech

VZ8(6)9 rev B I2C communication quick manual. SGX Sensortech VZ8(6)9 rev B I2C communication quick manual 1. VZ PCBA considerations External pull-up restors (4k7) are required on SDA And SCL (they are not implemented on VZ PCBA) VDD for VZ8(6)9T = 3V3 VDD for VZ8(6)9F

More information

I2C TM Master Library Module (Polled)

I2C TM Master Library Module (Polled) I2C TM Master Library Module (Polled) 1. Introduction... 2 2. Module Features...2 3. List of Component Modules... 3 4. Using the Library Module in a Project... 3 5. List of Shared Parameters... 4 Shared

More information

Groking the Linux SPI Subsystem FOSDEM Matt Porter

Groking the Linux SPI Subsystem FOSDEM Matt Porter Groking the Linux SPI Subsystem FOSDEM 2017 Matt Porter Obligatory geek reference deobfuscation grok (/gräk/) verb to understand intuitively or by empathy, to establish rapport with. Overview What is SPI?

More information

Using kgdb and the kgdb Internals

Using kgdb and the kgdb Internals Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom

More information

ICN12. I2C to UART Bridge, ADC,DAC and I/O

ICN12. I2C to UART Bridge, ADC,DAC and I/O Firmware version 1.4 Introduction ICN12 I2C to UART Bridge, ADC,DAC and I/O This is an I2C to UART bridge, designed to give an extra UART to a microcontroller when only I2C is available. It is an I2C device

More information

regmap The power of subsystems and abstractions 2012 Wolfson Microelectronics plc

regmap The power of subsystems and abstractions 2012 Wolfson Microelectronics plc regmap The power of subsystems and abstractions 1 2012 Wolfson Microelectronics plc November 2012 Overview The quality of the subsystems is key to Linux Factor common code out of drivers Simplify driver

More information

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device.

RX Family APPLICATION NOTE. Simple I 2 C Module Using Firmware Integration Technology. Introduction. Target Device. APPLICATION NOTE RX Family R01AN1691EJ0220 Rev. 2.20 Introduction This application note describes the simple I 2 C module using firmware integration technology (FIT) for communications between devices

More information

Using FlexIO to emulate communications and timing peripherals

Using FlexIO to emulate communications and timing peripherals NXP Semiconductors Document Number: AN12174 Application Note Rev. 0, 06/2018 Using FlexIO to emulate communications and timing peripherals 1. Introduction The FlexIO is a new on-chip peripheral available

More information

Ethernet switch support in the Linux kernel

Ethernet switch support in the Linux kernel ELC 2018 Ethernet switch support in the Linux kernel Alexandre Belloni alexandre.belloni@bootlin.com Copyright 2004-2018, Bootlin. Creative Commons BY-SA 3.0 license. Corrections, suggestions, contributions

More information

Bridging of Control Interfaces over Multimedia Serial Links

Bridging of Control Interfaces over Multimedia Serial Links Bridging of Control Interfaces over Multimedia Serial Links Vladimir Zapolskiy Open Source Senior Software Engineer June 22, 2018 Introduction Embedded Linux developer since 2006 Open Source Software contributor

More information

Introduction to I2C & SPI. Chapter 22

Introduction to I2C & SPI. Chapter 22 Introduction to I2C & SPI Chapter 22 Issues with Asynch. Communication Protocols Asynchronous Communications Devices must agree ahead of time on a data rate The two devices must also have clocks that are

More information

Processes (Intro) Yannis Smaragdakis, U. Athens

Processes (Intro) Yannis Smaragdakis, U. Athens Processes (Intro) Yannis Smaragdakis, U. Athens Process: CPU Virtualization Process = Program, instantiated has memory, code, current state What kind of memory do we have? registers + address space Let's

More information

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9 Product specification December 2008 V0.a ByVac 2006 ByVac Page 1 of 9 Contents 1. Introduction...3 2. Features...3 3. Electrical Specification...3 4. I2C set...4 5. The LCD Set...5 5.1. 1...5 5.2. 2...5

More information

RL78 Serial interfaces

RL78 Serial interfaces RL78 Serial interfaces Renesas Electronics 00000-A Introduction Purpose This course provides an introduction to the RL78 serial interface architecture. In detail the different serial interfaces and their

More information

Tutorial for I 2 C Serial Protocol

Tutorial for I 2 C Serial Protocol Tutorial for I 2 C Serial Protocol (original document written by Jon Valdez, Jared Becker at Texas Instruments) The I 2 C bus is a very popular and powerful bus used for communication between a master

More information

Application Note. Utilising the E2 Interface

Application Note. Utilising the E2 Interface Application Note Utilising the E2 Interface Version 1.03 Name Date Created Robert Mayr. 13.04.2011 Checked Released Reason for change Code batch according ACK/NACK CONTENTS 1 INTRODUCTION... 3 2 EXAMPLE

More information

SRF02 Ultrasonic range finder Technical Specification

SRF02 Ultrasonic range finder Technical Specification SRF02 Ultrasonic range finder Technical Specification I2C Mode For Serial mode click here I2C Communication To use the SRF02 in I2C mode, make sure nothing is connected to the mode pin, it must be left

More information

Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to

Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to handle the STM32 peripheral data transfers. 1 The Direct

More information

TSB Software Reference Manual

TSB Software Reference Manual TSB Software Reference Manual Temperature Sensors Board Commands Description L. Castellani I.N.F.N. sez. PADOVA 10 December 2009 Document Version 1.4 Firmware Version 2.5 Introduction The TSB emulate the

More information

Power Management Integrated Circuits: Keep the power in your hands

Power Management Integrated Circuits: Keep the power in your hands Embedded Linux Conference 2017 Power Management Integrated Circuits: Keep the power in your hands Quentin Schulz Bootlin quentin.schulz@bootlin.com - Kernel, drivers and embedded Linux - Development, consulting,

More information

CSE 509: Computer Security

CSE 509: Computer Security CSE 509: Computer Security Date: 2.16.2009 BUFFER OVERFLOWS: input data Server running a daemon Attacker Code The attacker sends data to the daemon process running at the server side and could thus trigger

More information

I2C Demonstration Board I 2 C-bus Master Selector

I2C Demonstration Board I 2 C-bus Master Selector I2C 2005-1 Demonstration Board I 2 C-bus Master Selector Oct, 2006 2 to 1 I 2 C Master Selector w/interrupt Logic and Reset Master 0 I 2 C Bus Master 1 I 2 C Bus Interrupt 0 Out Interrupt 1 Out I Interrupt

More information

SRF08 Ultra sonic range finder Technical Specification

SRF08 Ultra sonic range finder Technical Specification SRF08 Ultra sonic range finder Technical Specification Communication with the SRF08 ultrasonic rangefinder is via the I2C bus. This is available on popular controllers such as the OOPic and Stamp BS2p,

More information

Power Management Integrated Circuits: Keep the power in your hands

Power Management Integrated Circuits: Keep the power in your hands Embedded Linux Conference 2017 Power Management Integrated Circuits: Keep the power in your hands Quentin Schulz free electrons quentin.schulz@free-electrons.com free electrons - Embedded Linux, kernel,

More information

Vinod Koul, Sanyog Kale Intel Corp. MIPI SoundWire Linux Subsystem: An introduction to Protocol and Linux Subsystem

Vinod Koul, Sanyog Kale Intel Corp. MIPI SoundWire Linux Subsystem: An introduction to Protocol and Linux Subsystem Vinod Koul, Sanyog Kale MIPI SoundWire Linux Subsystem: An introduction to Protocol and Linux Subsystem Agenda MIPI SoundWire Basics Linux Subsystem SoundWire Linux Bus SoundWire Master SoundWire Slave

More information

Industrial I/O and You: Nonsense Hacks! Matt Ranostay Konsulko Group

Industrial I/O and You: Nonsense Hacks! Matt Ranostay Konsulko Group Industrial I/O and You: Nonsense Hacks! Matt Ranostay Konsulko Group Brief Introduction Been a contributor to the Industrial I/O system for about two years Any weird sensors

More information

Groking the Linux SPI Subsystem Embedded Linux Conference Matt Porter

Groking the Linux SPI Subsystem Embedded Linux Conference Matt Porter Groking the Linux SPI Subsystem Embedded Linux Conference 2017 Matt Porter Obligatory geek reference deobfuscation grok (/gräk/) verb to understand intuitively or by empathy, to establish rapport with.

More information

Assignment 2: I2C Simulator - V1.02

Assignment 2: I2C Simulator - V1.02 Assignment 2: I2C Simulator - V1.02 Due Wednesday February 22 nd, 2012 by 11:59 pm. Submit deliverables via CourSys: https://courses.cs.sfu.ca/ Late penalty is 10% per calendar day (each 0 to 24 hour period

More information

SCSI TOOLBOX, LLC. Command Probability Sequencer

SCSI TOOLBOX, LLC. Command Probability Sequencer SCSI TOOLBOX, LLC Command Probability Sequencer Contents What is the Command Probability Sequencer...3 First Example...4 Second Example: Writing Every Even LBA With An Incrementing Pattern and Every Odd

More information

Arduino EEPROM module 512K for Sensor Shield

Arduino EEPROM module 512K for Sensor Shield Arduino EEPROM module 512K for Sensor Shield Experiment Steps This is a new designed for small data size storage. It can help to extend the EEPROM storage of Arduino. This module uses I2C to connect to

More information

Two Wire Interface (TWI) also commonly called I2C

Two Wire Interface (TWI) also commonly called I2C (TWI) also commonly called I2C MSP432 I2C 2 tj MSP432 I2C ARM (AMBA Compliant) 8 bit transmission word 7/10 bit addressing Multi-master/slave modes 4 slave addresses 4 eusci-b modules 3 tj Overview 8 bit

More information

BMF055 Example Project BSX Lite Integration

BMF055 Example Project BSX Lite Integration BMF055 Example Project BSX Lite Integration Application Note: Document Revision 1.0 Document Release October 2015 Document Number BST-BMF055-EX003-00 Technical Reference 0 273 141 235 Notes Data in this

More information

F28335 I2C MODULE v1.1

F28335 I2C MODULE v1.1 1 F28335 I2C MODULE v1.1 Abstract This document describes how to configure for I2C module of F28335. 2 Table of Contents 1. Overview... 3 2. Configuration details... 3 3. Reference... 7 3 1. Overview Step

More information

BV4205. I2C-10 Channel A to D. Product specification. January 2008 V0.a. ByVac Page 1 of 10

BV4205. I2C-10 Channel A to D. Product specification. January 2008 V0.a. ByVac Page 1 of 10 Product specification January 2008 V0.a ByVac Page 1 of 10 Contents 1. Introduction...4 2. Features...4 3. Physical Specification...4 3.1. Factory (hardware) reset...4 3.2. Analogue Inputs...4 3.3. Voltage

More information

VORAGO VA108x0 I 2 C programming application note

VORAGO VA108x0 I 2 C programming application note AN1208 VORAGO VA108x0 I 2 C programming application note MARCH 14, 2017 Version 1.1 VA10800/VA10820 Abstract There are hundreds of peripheral devices utilizing the I 2 C protocol. Most of these require

More information

SPI Framework Module Guide

SPI Framework Module Guide Application Note Introduction This module guide will enable you to effectively use a module in your own design. Upon completion of this guide, you will be able to add this module to your own design, configure

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming Input Processing in Linux (Module 17) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Linux Input Systems An option: each attached input device

More information

Structured Data. CIS 15 : Spring 2007

Structured Data. CIS 15 : Spring 2007 Structured Data CIS 15 : Spring 2007 Functionalia HW4 Part A due this SUNDAY April 1st: 11:59pm Reminder: I do NOT accept LATE HOMEWORK. Today: Dynamic Memory Allocation Allocating Arrays Returning Pointers

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming Interrupt Processing in Linux (Module 14) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Example of I2C Devices Two Wii nunchuck devices one

More information

U-Boot bootloader port done right 2017 edition

U-Boot bootloader port done right 2017 edition U-Boot bootloader port done right 2017 edition Marek Vašut December 1st, 2017 Marek Vasut Software engineer Versatile Linux kernel hacker Custodian at U-Boot bootloader OE-core

More information

ArduCAM USB Camera SDK

ArduCAM USB Camera SDK ArduCAM USB Camera SDK User Guide Rev 1.0, April 2017 Table of Contents 1 Introduction... 2 2 USB SDK Library... 2 3 Demo Code... 2 3.1 Thread.cpp... 2 3.2 USBTestDlg.cpp... 2 4 ArduCAM APIs... 2 4.1 Data

More information

ArduCAM USB Camera SDK

ArduCAM USB Camera SDK ArduCAM USB Camera SDK User Guide Rev 1.2, May 2018 Table of Contents 1 Introduction... 3 2 USB SDK Library... 3 3 Demo Code... 3 3.1 Thread.cpp... 3 3.2 USBTestDlg.cpp... 3 3.3 CommonTools.cpp... 3 4

More information

USB-I2C USB to I2C Communications Module Technical Specification

USB-I2C USB to I2C Communications Module Technical Specification Page 1 of 7 USB-I2C USB to I2C Communications Module Technical Specification The USB-I2C module provides a complete interface between your PC and the I2C bus. The module is self powered from the USB cable

More information

SFO15-505: Introducing I2C and GPIO userspace APIs for Android

SFO15-505: Introducing I2C and GPIO userspace APIs for Android SFO15-505: Introducing I2C and GPIO userspace APIs for Android Presented by Satish Patel Satish Patel Date Friday 25 September 2015 Event SFO15 Scope Background High level diagram API reference Why native

More information

EZ I 2 C Slave. Features. General Description. When to use a EZ I 2 C Slave 1.50

EZ I 2 C Slave. Features. General Description. When to use a EZ I 2 C Slave 1.50 PSoC Creator Component Data Sheet EZ I 2 C Slave 1.50 Features Industry standard Philips I 2 C bus compatible interface Emulates common I 2 C EEPROM interface Only two pins (SDA and SCL) required to interface

More information

USB-910H API DLL and Include File Reference Manual

USB-910H API DLL and Include File Reference Manual USB-910H API DLL and Include File Reference Manual APPLICABLE ADAPTERS This Application Note applies to the following Keterex products: KXUSB-910H. AN2101 Application Note INTRODUCTION The Keterex USB-910H

More information

ArduCAM-M-2MP Camera Shield

ArduCAM-M-2MP Camera Shield 33275-MP ArduCAM-M-2MP Camera Shield 2MP SPI Camera Hardware Application Note Rev 1.0, Mar 2015 33275-MP ArduCAM-M-2MP Hardware Application Note Table of Contents 1 Introduction... 2 2 Typical Wiring...

More information

Display Virtualization with KVM for Automotive Systems

Display Virtualization with KVM for Automotive Systems Display Virtualization with KVM for Automotive Systems Automotive Linux Summit 2018 Tokyo, Japan Laurent Pinchart laurent.pinchart@ideasonboard.com In computing, virtualization refers to the act of creating

More information

ArduCAM USB Camera C/C++ SDK

ArduCAM USB Camera C/C++ SDK ArduCAM USB Camera C/C++ SDK User Guide Rev 1.3, Oct 2018 Table of Contents 1 Introduction... 3 2 USB SDK Library... 3 3 Demo Code... 3 3.1 Thread.cpp... 3 3.2 USBTestDlg.cpp... 3 3.3 CommonTools.cpp...

More information

DRONE SITL BRINGUP WITH THE IIO FRAMEWORK

DRONE SITL BRINGUP WITH THE IIO FRAMEWORK DRONE SITL BRINGUP WITH THE IIO FRAMEWORK Bandan Das Open Source Summit, Europe, 2018 1. 1 WHAT'S THIS ABOUT? My experiments with bringing up sensors on a x86 board Understanding the IIO

More information

21. TWI Two-Wire Interface

21. TWI Two-Wire Interface 21. TWI Two-Wire Interface 21.1 Features Bidirectional, two-wire communication interface Phillips I 2 C compatible System Management Bus (SMBus) compatible Bus master and slave operation supported Slave

More information

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19)

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19) Homework / Exam Return and Review Exam #1 Reading S&S Extracts 385-393, PIC Data Sheet Machine Projects Start on mp3 (Due Class 19) Labs Continue in labs with your assigned section 1 Interrupts An interrupt

More information

AN-895 APPLICATION NOTE

AN-895 APPLICATION NOTE APPLICATION NOTE One Technology Way P.O. Box 9106 Norwood, MA 02062-9106, U.S.A. Tel: 781.329.4700 Fax: 781.461.3113 www.analog.com ADuC702x MicroConverter I 2 C -Compatible Interface by Michael Looney

More information

I 2 C Application Note in Protocol B

I 2 C Application Note in Protocol B I 2 C Application Note in Protocol B Description This document is a reference for a possible coding method to achieve pressure, temperature, and status for SMI part readings using I 2 C. This SMI Protocol

More information

Functional block diagram AD53x1 (Analog Devices)

Functional block diagram AD53x1 (Analog Devices) Objectives - To read the A/D converter and turn the converted digital value back into an analogue voltage using an external D/A converter. The entire cycle including ADC and DAC is to be run at a fixed

More information

. Compressing Strings of the Kernel. Wolfram Sang , LinuxCon14

. Compressing Strings of the Kernel. Wolfram Sang , LinuxCon14 Compressing Strings of the Kernel Wolfram Sang Consultant 2182014, LinuxCon14 Wolfram Sang (wsa@the-dreamsde) Compressing Strings of the Kernel 2182014, LinuxCon14 1 / 36 The origin: CEWG project 1 From

More information

PCA General description. 2-to-1 I 2 C-bus master selector with interrupt logic and reset

PCA General description. 2-to-1 I 2 C-bus master selector with interrupt logic and reset Rev. 7.1 24 June 2015 Product data sheet 1. General description The is a 2-to-1 I 2 C-bus master selector designed for high reliability dual master I 2 C-bus applications where system operation is required,

More information

SPMI: System Power Management Interface

SPMI: System Power Management Interface SPMI: System Power Management Interface Presented by: Josh Cartwright Presentation Date: 4/30/14 PAGE 1 What is SPMI? PAGE 2 Agenda Architectural Overview Components Addressing Sequences and Arbitration

More information

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio

ECE Microcontrollers. Serial Peripheral Interface (SPI) & NRF24 Radio ECE 381 - Microcontrollers Serial Peripheral Interface (SPI) & NRF24 Radio Lab 9 Summary We will develop a wireless temperature sensor Once a second, sample LM34CZ voltage Convert to floating point with

More information

Lesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver

Lesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver Lesson I2C I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver I²C (Inter-Integrated Circuit) What is I 2 C I2C is pronounced "eye-squared see". It is also known as "TWI" because of the initial

More information

User-configurable Resolution. 9 to 12 bits (0.5 C to C)

User-configurable Resolution. 9 to 12 bits (0.5 C to C) AT30TS75A 9- to 12-bit Selectable, ±0.5 C Accurate Digital Temperature Sensor DATASHEET See Errata in Section 12. Features Single 1.7V to 5.5V Supply Measures Temperature -55 C to +125 C Highly Accurate

More information

Emulating I2C Bus Master by using FlexIO

Emulating I2C Bus Master by using FlexIO Freescale Semiconductor, Inc. Document Number: AN5133 Application Notes Rev. 0, 06/2015 Emulating I2C Bus Master by using FlexIO 1. Introduction This application note lists the steps to use the FlexIO

More information

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD Application Note Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD AN014902-1207 Abstract This Application Note describes APIs for interfacing one or more I 2 C-based character LCDs with

More information

Application note Differential Pressure Sensor Type D6F-PH (Rev 1.0)

Application note Differential Pressure Sensor Type D6F-PH (Rev 1.0) Application note Differential Pressure Sensor Type D6F-PH (Rev 1.0) Introduction This document provides application information for the thermal flow sensor. This is preliminary and may be changed without

More information

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET Development and research of different architectures of I 2 C bus controller E. Vasiliev, MIET I2C and its alternatives I²C (Inter-Integrated Circuit) is a multi-master serial computer bus invented by Philips

More information

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used to connect devices such as microcontrollers, sensors,

More information

The Serial Device Bus

The Serial Device Bus The Serial Device Bus Johan Hovold Hovold Consulting AB Embedded Linux Conference Europe October 23, 2017 Introduction UARTs and RS-232 have been around since 1960s Common interface for Bluetooth, NFC,

More information

GPIO for Engineers and Makers. Linus Walleij, Linaro

GPIO for Engineers and Makers. Linus Walleij, Linaro GPIO for Engineers and Makers Linus Walleij, Linaro GPIOLIB: What has happened since this (2006)? int gpio_request(unsigned gpio, const char *label) int gpio_free(unsigned gpio) int gpio_direction_input(unsigned

More information

Implementation of MCU Invariant I2C Slave Driver Using Bit Banging

Implementation of MCU Invariant I2C Slave Driver Using Bit Banging Implementation of MCU Invariant I2C Slave Driver Using Bit Banging Arindam Halder, Ranjan Dasgupta Innovation Lab, TATA Consultancy Services, Ltd. Kolkata, India arindam.halder@tcs.com,ranjan.dasgupta@tcs.com

More information

SILICON MICROSTRUCTURES

SILICON MICROSTRUCTURES Digital Communication with SM5800 Series Parts OVERVIEW The SM5800 series pressure product offers the corrected pressure output in both analog and digital formats. Accessing the analog output is an easy

More information

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT 1 Lecture 5: Computing Platforms Asbjørn Djupdal ARM Norway, IDI NTNU 2013 2 Lecture overview Bus based systems Timing diagrams Bus protocols Various busses Basic I/O devices RAM Custom logic FPGA Debug

More information

Embedded Workshop 10/28/15 Rusty Cain

Embedded Workshop 10/28/15 Rusty Cain 2 IC Embedded Workshop 10/28/15 Rusty Cain Set up for Workshop: Please Sign in on Sheet. Please include your email. While you are waiting for the Workshop to begin 1. Make sure you are connected to the

More information

Another introduction into radare2. {condret Lukas}

Another introduction into radare2. {condret Lukas} Another introduction into radare2 {condret Lukas} Overview Features Components Api examples Introduction into Esil Problems Features Radare2 is not just one tool or a conglomeration of several tools. It

More information

BMF055 Example Project Interrupts

BMF055 Example Project Interrupts BMF055 Example Project Interrupts Application Note: Document Revision 1.1 Document Release October 2015 Document Number BST- BMF055-EX002-00 Technical Reference 0 273 141 235 Notes Data in this document

More information

libnetfilter_log Reference Manual

libnetfilter_log Reference Manual libnetfilter_log Reference Manual x.y Generated by Doxygen 1.4.6 Tue Mar 21 13:47:12 2006 CONTENTS 1 Contents 1 libnetfilter_log File Index 1 2 libnetfilter_log File Documentation 1 1 libnetfilter_log

More information

PDA TM4301: 4.3in PCAP Touch Module

PDA TM4301: 4.3in PCAP Touch Module Features Complete Touchscreen Module: Projected Capacitive Multi Touch Controller 4.3in LCD 4 Capacitive Navigation Keys 200 bytes non-volatile serial EEPROM Touch: Atmel maxtouch mxt336s Touch Controller

More information

Win-I2CUSBDLL. Software User s Manual. The Boardshop

Win-I2CUSBDLL. Software User s Manual. The Boardshop Win-I2CUSBDLL Software User s Manual The Boardshop http://www.demoboard.com Information provided in this document is solely for use with Win-I2CUSBDLL. The Boardshop and SB Solutions, Inc. reserve the

More information

New GPIO interface for linux user space. Linux Piter 2018 Bartosz Golaszewski

New GPIO interface for linux user space. Linux Piter 2018 Bartosz Golaszewski New GPIO interface for linux user space Linux Piter 2018 Bartosz Golaszewski About us Embedded Linux Engineering Firm ~30 senior engineers, coming from the semiconductor world HW and SW products: from

More information

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4 RP-VL-UTIL-V1 Developer s Guide [ Contents ] 1. Introduction... 1 2. Building Environment... 1 3. Operating Environment... 1 4. Function Explanation... 2 4.1. Common API for Transmitting and Receiving...

More information

Each I2C master has 8-deep transmit and receive FIFOs for efficient data handling. SPI to Dual I2C Masters. Registers

Each I2C master has 8-deep transmit and receive FIFOs for efficient data handling. SPI to Dual I2C Masters. Registers February 205 Introduction Reference Design RD73 I2C and SPI are the two widely used bus protocols in today s embedded systems. The I2C bus has a minimum pin count requirement and therefore a smaller footprint

More information

RX Family, RL78 Family

RX Family, RL78 Family Introduction APPLICATION NOTE This application note explains the method of controlling R1EV24xxx, R1EX24xxx, and HN58X24xxx series I 2 C serial EEPROM, manufactured by Renesas Electronics, by using a Renesas

More information

RAS Enhancement Activities for Mission-Critical Linux Systems

RAS Enhancement Activities for Mission-Critical Linux Systems RAS Enhancement Activities for MissionCritical Linux Systems Hitachi Ltd. Yoshihiro YUNOMAE 01 MissionCritical Systems We apply Linux to missioncritical systems. Banking systems/carrier backend systems/train

More information

GIGAVAC Contactors I 2 C Communication

GIGAVAC Contactors I 2 C Communication Document Revision: 3 GIGAVAC Contactors I 2 C Communication Product models: MXST15/16-mm-ss, delay on break contactors. Attention: Read this instruction entirely for a top-level-feel of what you prefer

More information

I2C interface Tutorial

I2C interface Tutorial UG108: Praxis II January 2013 Asian Institute of Technology Undergraduate Program Handout: I2C interface Instructor: Chaiyaporn Silawatchananai, Matthew N. Dailey I2C interface Tutorial Introduction: In

More information

KNJN I2C bus development boards

KNJN I2C bus development boards KNJN I2C bus development boards 2005, 2006, 2007, 2008 KNJN LLC http://www.knjn.com/ Document last revision on December 5, 2008 R22 KNJN I2C bus development boards Page 1 Table of Contents 1 The I2C bus...4

More information