USB Programming Model
14-46
ADSP-BF535 Blackfin Processor Hardware Reference
USBD Device Initialization
Device initialization consists of several steps that prepare the USBD mod-
ule to transfer data. On a hard reset event, software should perform the
following steps.
1. Program the UDC module’s endpoint buffers.
For more informa-
tion, see “Configuration of the UDC Module” on page 14-44.
2. Program interrupt masks in
USBD_GINTR
,
USBD_INTRx
and the DMA
interrupt enables in
USBD_DMACFG
.
3. Program the DMA master interface with the USB module’s base
address (
USBD_DMABLO
,
USBD_DMABHI
) in system memory and enable
the DMA.
4. Program the endpoint registers for endpoint 0 in order to receive
commands from the USB host:
a.
USBD_EPCFG0
–
USBD_MAX
= Endpoint’s maximum packet
size,
USBD_DIR
= OUT,
USBD_ARM
= 1.
b.
USBD_EPADR0
= As desired.
c.
USBD_EPLEN0
= As desired. Control endpoints typically spec-
ify an 8 byte packet size.
5. Enable the module for USB activity by setting the
USBD_ENA
bit in
the
USBD_CTRL
register.
6. Wait for a
USBD_CFG
interrupt, or for a SETUP packet on endpoint
0.
The most likely sequence of events from the USB is that the device
comes out of reset and receives a
GET_DESCRIPTOR
request from the
USB host for the first 8 bytes of the device descriptor, potentially
followed by additional
GET_DESCRIPTOR
requests. At that point, the
Содержание ADSP-BF535 Blackfin
Страница 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Страница 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...
Страница 908: ...SDRAM Controller External Bus Interface Unit B 36 ADSP BF535 Blackfin Processor Hardware Reference...