Rev.2.00 Oct 16, 2006 page 178 of 354
REJ09B0340-0200
M30245 Group
2. USB function
Figure 2.8.36. Processing routine (1) for getting device address when receiving SET_ADDRESS request
bRequest: 05
16
?
USB addrtess register:
00
16
?
b7
(b15)
b7
(b8)
b0
b0
0
0
b7
(b15)
b7
(b8)
b0
b0
b7
(b15)
b7
(b8)
b0
b0
0
0
1
1
b7
(b15)
b7
(b8)
b0
b0
0
0
0
0
0
0
0
0
0
1
≠
≠
≠
=
=
=
Waiting for completion of status phase
Receiving of endpoint 0 setup packet
Confirming of receive data
Note 1: There is no receive data in FIFO 0 when this bit is set to “0”.
USB endpoint 0 control and status register
EP0CS [Address 0298
16
]
OUT_BUF_RDY flag (Note 1)
0 : Reading data packet is complete
1 : Data packet reception is compete
SETUP flag
0 : Data packet reception
1 : SETUP packet reception
Reading of receive data
USB endpoint 0 OUT FIFO data register
EP0O [Address 02E2
16
]
The data equal to receive byte count are read (setup packet is 8-byte).
Store the receive data in user definition RAM.
To processing routine of
other standard requests
Is a request valid?
To processing of request invalid
Getting of new address
(continued on next page)
Getting of address (default state)
Setting of receive device address to USB address register (Note 2)
Note 2: Only the lower 1-byte of the receive device address should be set.
USB address register
USBA [Address 0280
16
]
Set the third byte (the lower of wValue) of reception data
Setting of USB endpoint 0 control and status reister. Continued on a status stage.
USB endpoint 0 control and status register
EP0CS [Address 0298
16
]
CLR_OUT_BUF_RDY bit
1 : Clear OUT_BUF_RDY flag
CLR_SETUP flag
1 : Clear SETUP flag
SET_DATA_END bit
1 : Set DATA_END flag to “1”
Completion of SET_ADDRESS request
Valid
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...