Download UM10375
Transcript
D D R R R R R D D D D R R D R R A FT FT FT A A R R D D D R A FT FT A A R R D D Reset value F FT FT A A R R D D D BULKOUT Description FT FT FT FT 1 Value A A A A R R D D D Table 138. USB Device FIQ Select register (USBDevFIQSel - address 0x4002 002C) bit description Symbol FT FT FT FT FT UM10375 Chapter 9: LPC13xx USB device controller Bit A A A A A NXP Semiconductors D R A - D Interrupt routing for bulk in endpoints [1] FT BULKOUT interrupt will be routed to the high-priority interrupt line FIQ. A 1 R [1] BULKOUT interrupt will be routed to the low-priority interrupt line IRQ. BULKIN 31:3 0 0 D 2 Interrupt routing for bulk out endpoints [1] 0 0 BULKIN interrupt will be routed to the low-priority interrupt line IRQ. 1 BULKIN interrupt will be routed to the high-priority interrupt line FIQ. - Reserved - Remark: For logical endpoint 3 (physical endpoints 6 and 7) only. 10. Serial interface engine command description The functions and registers of the Serial Interface Engine (SIE) are accessed using commands, which consist of a command code followed by optional data bytes (read or write action). The USBCmdCode (Table 9–131) and USBCmdData (Table 9–132) registers are used for these accesses. A complete access consists of two phases: 1. Command phase: the USBCmdCode register is written with the CMD_PHASE field set to the value 0x05 (Command), and the CMD_CODE field set to the desired command code. On completion of the command, the CCEMPTY bit of USBDevIntSt is set. 2. Data phase (optional): for writes, the USBCmdCode register is written with the CMD_PHASE field set to the value 0x01 (Write), and the CMD_WDATA field set with the desired write data. On completion of the write, the CCEMPTY bit of USBDevIntSt is set. For reads, USBCmdCode register is written with the CMD_PHASE field set to the value 0x02 (Read), and the CMD_CODE field set with command code the read corresponds to. On completion of the read, the CDFULL bit of USBDevInSt will be set, indicating the data is available for reading in the USBCmdData register. In the case of multi-byte registers, the least significant byte is accessed first. An overview of the available commands is given in Table 9–139. Here is an example of the Read Current Frame Number command (reading 2 bytes): USBDevIntClr = 0x30; USBCmdCode = 0x00F50500; while (!(USBDevIntSt & 0x10)); USBDevIntClr = 0x10; USBCmdCode = 0x00F50200; while (!(USBDevIntSt & 0x20)); USBDevIntClr = 0x20; CurFrameNum = USBCmdData; // // // // // // // // Clear both CCEMPTY & CDFULL CMD_CODE=0xF5, CMD_PHASE=0x05(Command) Wait for CCEMPTY. Clear CCEMPTY interrupt bit. CMD_CODE=0xF5, CMD_PHASE=0x02(Read) Wait for CDFULL. Clear CDFULL. Read Frame number LSB byte. UM10375_0 User manual © NXP B.V. 2009. All rights reserved. Rev. 00.10 — 19 October 2009 115 of 290