System information
5 Device Emulation
running on the chip are stored in the on-chip 16 KB SRAM memory. Additionally, an 8
KB sized ROM provides a built-in BIOS. It supports boot control and a set of basic low
level USB functions. Therefore, the controller is powerful and flexible to implement USB
functions. But the drawback is the complexity of the programs and the difficult development
of the USB firmware. Figure 5.2 depicts the interfaces of the USB controller on the CHARM
card. The four USB ports are separated into internal and external USB ports. Two of them
are connected to Mini USB plugs
5
at the card bracket. The other ports are connected to
onboard USB connectors. The internal SRAM of the USB controller is separated in three
sections: the firmware, the message control register and the HID control register. Table 5.1
depicts the partitions of the SRAM.
Address Window Size Content
0x0000 - 0x3000 12 KB Firmware
0x3FC0 - 0x3FC3 32 B Message Command Port
0x3FD0 - 0x3FD3 32 B Message Data Pointer Port
0x3FD4 - 0x3FD7 32 B Request Port
0x3FE0 - 0x3FE3 32 B Message Interrupt Port
0x3FE4 - 0x3FE7 32 B Message Size Port
0x3FE8 - 0x3FEB 32 B Message Acknowledge Port
0x3FF0 - 0x3FF1 16 B Keyboard Trigger Port
0x3FF2 - 0x3FF3 16 B Keyboard Data Port
0x3FF4 - 0x3FF5 16 B Mouse Trigger Port
0x3FF6 - 0x3FFB 32 B Mouse Data Port
Table 5.1: Partitions of the SRAM of the USB controller.
The first 12 KB contain the firmware of the USB chip. Depending on the task of the
firmware, its size varies from eight till fourteen kilo bytes. The 16-bit HPI bus interface of
the USB controller provides access to the internal memory and has a throughput of up to
16 MB/s. It interfaces with the HPI -Bridge which connects the HPI port to the AHB bus
system [69]. Figure 5.2 depicts the interfaces of the HPI bridge to its components.
With the aid of the CHARM Register, the HPI Bridge and the USB controller can be
switched into reset state. The HPI address window is mapped to the AHB bus system.
Table E.1 shows the location of this window.
5.1.3 Human Interface Device
A human interface device or HID is a type of computer device that interacts directly with
humans. A keyboard, mouse or a joystick is a classical human interface device. The CHARM
emulates a keyboard and a mouse. While HID emulation, the USB controller undertakes
the whole HID protocol. The ARM CPU is not affected in this process. The keystroke
and the mouse movement values are directly written to a register inside the USB chip [70].
This register is periodically read out by a program running on the USB chip. Figure 5.3
5
Mini USB is a standardize USB plugs with a small form factor.
68