Protocol Engine Command Description - Philips LPC214 Series User Manual

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
Table 224: USB System Error Interrupt Set register (USBSysErrIntSet - address 0xE009 00C0) bit description
Bit
Symbol
Value
31:0
EPxx
0
1

14.9 Protocol engine command description

The protocol engine operates based on the commands issued from the CPU.
These commands have to be written into the Command Code register
The read data when present will be available in the Command Data register
(Section
protocol engine commands.
Here is an example of the Read Current Frame Number command (reading 2 bytes):
USBDevIntClr = 0x30;
USBCmdCode = 0x00F50500;
while (!(USBDevIntSt & 0x10)); // Wait cmd_code_empty
USBDevIntClr = 0x10;
USBCmdCode = 0x00F50200;
while (!(USBDevIntSt & 0x20)); // Wait for cmd_data_full
CurFrameNum = USBCmdData;
USBDevIntClr = 0x10;
USBCmdCode = 0x00F50200;
while (!(USBDevIntSt & 0x20)); // Wait for cmd_data_full
Temp = USBCmdData;
CurFrameNum = CurFrameNum | (Temp << 8);
Table 225: Protocol engine command code table
Command name
Device commands
Set Address
Configure Device
Set Mode
Read Current Frame Number
Read Test Register
Set Device Status
Get Device Status
Get Error Code
Read Error Status
Endpoint Commands
9397 750 XXXXX
User manual
Description
Set endpoint xx (0
xx
Ne effect.
Set the EPxx System Error Interrupt request in the USBSysErrIntSt register.
14.8.10) after the successful execution of the command.
Recipient
Command
Device
00 D0 05 00
Device
00 D8 05 00
Device
00 F3 05 00
Device
00 F5 05 00
Device
00 FD 05 00
Device
00 FE 05 00
Device
00 FE 05 00
Device
00 FF 05 00
Device
00 FB 05 00
Rev. 01 — 15 August 2005
Chapter 14: USB Device Controller
31) System Error Interrupt request.
// Clear cmd_code_empty & cmd_data_full int. bits
// Clear cmd_code_empty interrupt bit
// Read Frame number LSB byte
// Clear cmd_code_empty interrupt bit
// Read Frame number MSB byte
Data phase (coding)
Write 1 byte - 00 <Byte> 01 00
Write 1 byte - 00 <Byte> 01 00
Write 1 byte - 00 <Byte> 01 00
Read 1 or 2 bytes - 00 F5 02 00
Read 2 bytes - 00 FD 02 00
Write 1 byte - 00 <Byte> 01 00
Read 1 byte - 00 FE 02 00
Read 1 byte - 00 FF 02 00
Read 1 byte - 00 FB 02 00
UM10139
Reset
value
0
(Section
14.8.9).
Table 225
lists all
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
222

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2148Lpc2141Lpc2142Lpc2144Lpc2146

Table of Contents