Upload
darleen-phelps
View
215
Download
0
Embed Size (px)
Citation preview
©F.M. Rietti
Peripherals Connecting
Fundamentals
LM-18 Computer Science SSI Embedded Systems I
2
©F.M. Rietti
Peripherals Connecting
• Peripherals can be connected as:– Memory Mapped Devices (MMIO)– I/O bus (PMIO)
• Wired on PCB
• Externally wired
– I/O bus + Memory Mapped– Via an Interface
LM-18 Computer Science SSI Embedded Systems I
3
©F.M. Rietti
Peripherals Connecting (cont)
• Memory Mapped Devices– Peripheral object work as an ore or
more memory address, readable, writeable or both.
– Peripheral can have an interrupt line (not mandatory)
– Programmers communicate with peripheral, writing or reading a particular memory address
– WARNING in some HW r/w operation can generate a fault interrupt, when attempting to do an illegal operation, such read on address for writing and viceversa; when this occur a system crash must be handled.
LM-18 Computer Science SSI Embedded Systems I
4
©F.M. Rietti
Peripherals Connecting (cont)
• I/O bus (PMIO)– Some HW architectures have a
supplemental bus for I/O and instructions for reading & writing on this bus
– I/O process doesn’t interfere with cpu-memory exchanging
– Reading/Writing bus speeds can be different between memory and peripherals
• I/O bus + Memory Mapped– Both method, tipical device is the
Video Card on PC
LM-18 Computer Science SSI Embedded Systems I
5
©F.M. Rietti
Peripherals Connecting (cont)
• On Board Interfaces– Bus Bridges
• Adapt a bus to another– Speed adjustment
– Electrical adjustment
– Electrical Insulating
– Limit interrupt rate to principal bus
LM-18 Computer Science SSI Embedded Systems I
6
©F.M. Rietti
Peripherals Connecting (cont)
• On Board interfaces (cont)– Bus bridges (cont)
• Local Bus – Eisa– LAN– SCSI– PCI– USB
• Bus Bridged vs peripherals
– P2P wire (SATA disks)– Multiplexed wire
» IDE/EIDE» USB» ….
– PCB wired (PCI cards)
LM-18 Computer Science SSI Embedded Systems I
7
©F.M. Rietti
Peripherals Connecting (cont)
• On Board interfaces (cont)– Bus bridged (cont)
• Generally are microprocessor controlled cards able to do complex I/O operation with simply interface commands
– Ex: LAN Cards receive destination MAC address and data buffer, then perform complete I/O:
» Carrier On» Test power on line» Collision:
Detected: random wait and retryNot detected: transmit msg one bit at timeVerify Transmitted:
OK->returnNOK & #retry>0 -> retransmit …
» ….
LM-18 Computer Science SSI Embedded Systems I
8
©F.M. Rietti
Peripherals Connecting (cont)
• On Board interfaces (cont)– Directly Wired On PCB
– Wired outside PCB
– Most Common:• I2C
• SPI
• Ethernet
• USB
• RS232
LM-18 Computer Science SSI Embedded Systems I
9
©F.M. Rietti
Peripherals Connecting (cont)
• Point to Point (P2P)– One physical
connection for device
• Multiplexed Devices (MUX)– One physical
connection for devices