Professional Documents
Culture Documents
Lecture4 - DeviceDriver
Lecture4 - DeviceDriver
Content
▪ Device Driver Overview
▪ Summary
2
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
▪ Custom platforms
▫ Contain many peripheral devices and kernel supported CPU
● Get kernel to boot on the board
● Device drivers to allow applications to access peripheral
devices
4
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
5
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
Device Drivers
Interrupt Service Threads
User Mode
Kernel Mode
6
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
8
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
▪ Synchronous protocol
9
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
▪ Synchronous (SPI):
▫ There is a CLOCK line
▫ High speed
10
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
SPI Protocol
11
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
12
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
I2C vs SPI
▪ Number of pins 🡪 Difficult in tight
PCB layout
▪ SPI only allows one master on the
bus
▪ SPI is good for high data
rate full-duplex
14
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
I2C Protocol
Implement I2C
▪ I2C is a synchronous serial interface. The device in
control of triggering the clock signal is known as
the master. All other connected peripherals are known
as slaves. Each device is connected to the same set of
data signals to form a bus.
https://developer.android.co
m/things/sdk/pio/i2c
16
CO3037 – Lecture 3: Device Driver for Embedded Internet of Things (IoTs) Platforms
Summary
Conclusion
▪ UART - simple; not high speed; no clock needed; limited
to one device connected to the Pi.
19