Renesas M16C Series User Manual page 187

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30245 Group
www.DataSheet4U.com
Figure 2.8.36. Processing routine (1) for getting device address when receiving SET_ADDRESS request
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
Receiving of endpoint 0 setup packet
Confirming of receive data
(b15)
(b8)
b7
b0
b7
0
0
Note 1: There is no receive data in FIFO 0 when this bit is set to "0".
Reading of receive data
(b15)
(b8)
b7
b0
b7
Setting of receive device address to USB address register (Note 2)
(b15)
(b8)
b7
b0
b7
0
0
0
0
0
0
0
0
0
Note 2: Only the lower 1-byte of the receive device address should be set.
Setting of USB endpoint 0 control and status reister. Continued on a status stage.
(b15)
(b8)
b7
b0
b7
0
0
1
1
1
Waiting for completion of status phase
Completion of SET_ADDRESS request
page 178 of 354
b0
USB endpoint 0 control and status register
EP0CS [Address 0298
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
b0
USB endpoint 0 OUT FIFO data register
EP0O [Address 02E2
The data equal to receive byte count are read (setup packet is 8-byte).
Store the receive data in user definition RAM.
bRequest: 05
?
16
=
Is a request valid?
=
Valid
USB addrtess register:
00
?
16
=
Getting of address (default state)
b0
USB address register
USBA [Address 0280
Set the third byte (the lower of wValue) of reception data
USB endpoint 0 control and status register
b0
EP0CS [Address 0298
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"
]
16
]
16
To processing routine of
other standard requests
To processing of request invalid
Getting of new address
(continued on next page)
]
16
]
16
2. USB function

Advertisement

Table of Contents
loading

Table of Contents