Usb Function Control - Renesas M16C Series User Manual

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

Advertisement

M30245 Group

2.8.2 USB function control

The USB function control unit needs to be enabled for using the USB function. The initialization procedure
of the USB function control unit is explained below:
(1) Related Registers
USB control register
This register is used to control each operation of the USB function control unit. When using the USB
function, be sure to set USB clock enable bit to "1" before USB enable bit is set to "1". This register is
not affected by the USB reset signal. After the USB is enabled (USBC7 ="1"), a minimum 187.5 ns of
www.DataSheet4U.com
delay (three cycles of BCLK) is required before performing any other USB register read/write opera-
tions.
•USB clock enable bit
This bit is used to enable/disable the USB clock (fusb). This clock is supplied from frequency synthe-
sizer and is required for the USB operation. Set this bit to "1" when enabling the USB clock.
•USB SOF port select bit
This bit is used to enable/disable a SOF signal output on the P9
USB SOF signal. In this case, set the port P9
always output for about 166ns (2 cycles of the 12MHz USB clock) at start of the frame packet.
•USB enable bit
This bit is used to enable/disable the USB block. When this bit is set to "1", USB function is enabled.
After setting "1" to this bit, wait for at least 250ns and, then, read or write the other USB related
register.
The configuration of USB control register is shown in Figure 2.8.9.
USB Control register
b7
b6
b5
Figure 2.8.9. USB control register
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
________
b4
b3
b2
b1
b0
0
0
0
0
0
Symbol
USBC
Bit Symbol
Reserved
USBC5
USBC6
USBC7
Note 1: P9
Note 2: All USB internal registers are held at their default values.
page 139 of 354
to output mode. When this bit is set to "1", low pulse is
2
Address
000C
Bit Name
USB clock enable bit
USB SOF port select bit
USB enable bit
is used as GPI/O pin.
2
pin. Set this bit to "1" when using the
2
When reset
16
Function
Must always be set to "0"
0 : Disable
1 : Enable
0 : Disable (Note 1)
1 : Enable
0 : Disable (Note 2)
1 : Enable
2. USB function
00
16
R W
O O
O O
O O
O O

Advertisement

Table of Contents
loading

Table of Contents