Device Initialization
13-82
Figure 13–11.
Endpoint Configuration Routine
End of endpoint
configguration
routine
Enter Endpoint
Configuration
Routine
Any OUT
endpoint to
configure ?
(EPn)
Endpoint n is
of type ISO ?
Ptr_flag =
Pt
2^EPn_RX_Size
Double
-buffer
allowed for
EPn ?
Ptr_flag =
Pt
EPn_RX_Size
Any IN
endpoint to
configure ?
(EPn)
Endpoint n is
of type ISO ?
Fill EPn_TX register with:
– EPn_TX_Valid = 1
– EPn_TX_Db = 1
– EPn_TX_Size = EP Size (2 bits)
– EPn_TX_Iso = 0
– EPn_TX_ptr = Ptr_flag
Ptr_flag =
Pt
2^EPn_TX_Size
Ptr_flag =
Pt
EPn_TX_Size
Set Ptr_flag
to 8
Fill EP0 register with
– EP0_Size
– EP0_ptr=Ptr_flag
Ptr_flag =
Pt
EP0_Size
Fill EPn_TX register with:
– EPn_TX_Valid = 1
– EPn_TX_Db = 0
– EPn_TX_Size = EP Size (2 bits)
– EPn_TX_Iso = 0
– EPn_TX_ptr = Ptr_flag
Fill EPn_TX register with:
– EPn_TX_Valid = 1
– EPn_TX_Size = EP Size (3 bits)
– EPn_TX_Iso = 1
– EPn_TX_ptr = Ptr_flag
Double
-buffer
allowed for
EPn ?
Fill EPn_RX register with:
– EPn_RX_Valid = 1
– EPn_RX_Db = 0
– EPn_RX_Size = EP Size (2 bits)
– EPn_RX_Iso = 0
– EPn_RX_ptr = Ptr_flag
Fill EPn_RX register with:
– EPn_RX_Valid = 1
– EPn_RX_Db = 1
– EPn_RX_Size = EP Size (2 bits)
– EPn_RX_Iso = 0
– EPn_RX_ptr = Ptr_flag
Fill EPn_RX register with:
– EPn_RX_Valid = 1
– EPn_RX_Size = EP Size (3 bits)
– EPn_RX_Iso = 1
– EPn_RX_ptr = Ptr_flag
Another
OUT endpoint
to configure ?
(EPn)
Another
IN endpoint
to configure ?
(EPn)
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
No
Double-buffering is
activated in DMA mode
only.