beautypg.com

6 ep3 interrupt-in transfer – Renesas SH7641 User Manual

Page 828

background image

Section 20 USB Function Module

Rev. 4.00 Sep. 14, 2005 Page 778 of 982

REJ09B0023-0400

20.4.6

EP3 Interrupt-IN Transfer

USB function

Application

IN token reception

Data transmission to host

Set EP3 transmission

complete flag

(USBIFR1/EP3 TS = 1)

Write data to USBEP3 data

register (USBEPDR3)

Write 1 to EP3 packet

enable bit

(USBTRG/EP3 PKTE = 1)

Clear EP3 transmission

complete flag

(USBIFR1/EP3 TS = 0)

Write data to USBEP3 data

register (USBEPDR3)

Write 1 to EP3 packet

enable bit

(USBTRG/EP3 PKTE = 1)

Valid data

in EP3 FIFO?

Is there data

for transmission

to host?

Is there data

for transmission

to host?

No

Yes

No

Yes

No

Yes

NACK

ACK

Note: This flowchart shows just one example of interrupt transfer processing. Other possibilities include an

operation flow in which, if there is data to be transferred, the EP3 DE bit in the USB data status register
is referenced to confirm that the FIFO is empty, and then data is written to the FIFO.

Interrupt request

Figure 20.12 EP3 Interrupt-IN Transfer Operation

This manual is related to the following products: