mpc823rg Freescale Semiconductor, Inc, mpc823rg Datasheet - Page 827

no-image

mpc823rg

Manufacturer Part Number
mpc823rg
Description
Mpc823 Powerquicc Integrated Communications Processor For Portable Systems
Manufacturer
Freescale Semiconductor, Inc
Datasheet
16.10.8.11 USB CONTROLLER INITIALIZATION EXAMPLE (FUNCTION MODE). The
following is an example initialization sequence for the USB controller operating in function
mode. It can be used to set up four function endpoints (0–3) that fill up transmit FIFOs, so
that data is ready for transmission when an IN token is received from the USB. You can
generate the token by using a USB traffic generator.
1. Write 0x00010000 to the BRGC1 register for division factor 1 to produce 48MHz,
2. Clear the DR14 and DR15 bits of the PADIR and the DD14 and DD15 bits of the
3. Clear the DR10 and DR11 bits of the PCDIR. Set the DD10 and DD11 bits of the
4. Set the DR6 and DR7 bits of the PCDIR and the DD6 and DD7 bits of the PCPAR to
5. Write 0x0000 to initialize the FRAME_N parameter.
6. Write DPRAM+500 to the EP0PTR and DPRAM+520 to the EP1PTR to set up the
7. Write DPRAM+540 to the EP2PTR and DPRAM+560 to the EP3PTR to set up the
8. Write 0xBC800004 to DPRAM+20 to set up the various status and DATA LENGTH
9. Write DPRAM+200 to DPRAM+24 to set up the TX DATA BUFFER POINTER field of
10. Write BCC00004 to DPRAM +28 to set up the status and DATA LENGTH fields of the
11. Write DPRAM+210 to DPRAM+2C to set up the DATA BUFFER POINTER field of the
12. Write BC80004 to DPRAM+30 to set up the status and DATA LENGTH fields of the
13. Write DPRAM +220 to DPRAM+34 to set up the DATA BUFFER POINTER field of the
14. Write BCC00004 to DPRAM+30 to set up the status and DATA LENGTH fields of the
15. Write DPRAM+30 to DPRAM+3C to set up the DATA BUFFER POINTER field of the
16. Write CAFECAFE to DPRAM+200 to set up the endpoint 0 TX data pattern.
17. Write FACEFACE to DPRAM+210 to set up the endpoint 1 TX data pattern.
18. Write BACEBACE to DPRAM+220 to set up the endpoint 2 TX data pattern.
19. Write CACECACE to DPRAM+230 to set up the endpoint 3 TX data pattern.
assuming the system clock is 48MHz.
PAPAR to select the USBRXD and USBOE pins.
PCPAR and the CD1 and CTS1 bits of the PCSO to select the USBRXP and USBRXN
pins.
select the USBTXP and USBTXN pins.
endpoint 0 and 1 pointers.
endpoint 2 and 3 pointers.
fields of the endpoint 0 TX buffer descriptor.
the endpoint 0 TX buffer descriptor.
endpoint 1 TX buffer descriptor.
endpoint 1 TX buffer descriptor.
endpoint 2 TX buffer descriptor.
endpoint 2 TX buffer descriptor.
endpoint 3 TX buffer descriptor.
endpoint 3 TX buffer descriptor.
Freescale Semiconductor, Inc.
For More Information On This Product,
MPC823 REFERENCE MANUAL
Go to: www.freescale.com
Communication Processor Module
16-375

Related parts for mpc823rg