
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
169 of 368
NXP Semiconductors
UM10375
Chapter 11: LPC13xx USB on-chip drivers
11.3.2 USB initialization
This function must be called by the application software after the clock and pin
initialization. A pointer to the structure describing the USB device type is passed as a
parameter to this function. The USB device type can be HID or MSC. The pointer is stored
for future reference. The USB device controller is initialized and the corresponding USB
interrupt channel is enabled in the NVIC.
11.3.3 USB connect
This function is called after the USB initialization. This function uses the soft connect
feature to make the device visible on the USB bus. This function is called only after the
application is ready to handle the USB data. The enumeration process is started by the
host after the device detection. The driver handles the enumeration process according to
the USB device type pointer passed in the USB initialization function.
11.3.4 USB interrupt handler
When the user application is active the interrupt handlers are mapped in the user flash
space. The user application must provide an interrupt handler for the USB interrupt and
call this function in the interrupt handler routine. The driver interrupt handler takes
appropriate action according to the data received on the USB bus and the configured
device type (HID or MSC).
11.4 Calling the USB device driver
A fixed location in ROM contains a pointer to the ROM driver table i.e. 0x1FFF 1FF8. This
location is kept the same for a device family. The ROM driver table contains a pointer to
the USB driver table. Pointers to the various USB driver functions are stored in this table.
USB driver functions can be called by using a C structure.
illustrates the pointer
mechanism used to access the on-chip USB driver.
On-chip RAM from address 0x1000 0050 to 0x1000 0180 is used by the USB driver. This
address range should not be used by the application. For applications using the on-chip
USB driver, the linker control file should be modified appropriately to prevent usage of this
area for the application’s variable storage