HT82A832R
Rev. 1.00
20
July 18, 2006
There is a system clock control register implemented to select the clock used in the MCU. This register consists of a
USB clock control bit (USBCKEN), a second suspend mode control bit (SUSP2) and a system clock selection bit
(SYSCLK).
The endpoint selection is determined by EPS2, EPS1 and EPS0.
Bit No.
Label
R/W
Reset
Functions
0~2
EPS0~
EPS2
R/W
0
Accessing endpoint FIFO selection, EPS2, EPS1, EPS0:
000: Select endpoint 0 FIFO
001: Select endpoint 1 FIFO
010: Select endpoint 2 FIFO
011: Select endpoint 3 FIFO
100: Select endpoint 4 FIFO
101: reserved for future expansion, cannot be used
110: reserved for future expansion, cannot be used
111: reserved for future expansion, cannot be used
If the selected endpoints do not exist, the related function will be absent.
3
USBCKEN
R/W
0
USB clock control bit. When this bit is set to 1 , it indicates that the USB
clock is enabled. Otherwise, the USB clock is turned-off.
4
SUSP2
R/W
0
This bit is used for reducing power consumption in the suspend mode.
In normal mode, clear this bit to 0
In the HALT mode, set this bit to 1 to reducing power consumption.
5
f
SYS
24MHz
R/W
0
This bit is used to define if the MCU system clock comes form an external
OSC or comes from the PLL output 24MHz clock.
0: system clock sourced from OSC
1: system clock sourced from the PLL output 24MHz
6
SYSCLK
R/W
0
This bit is used to specify the MCU system clock oscillator frequency.
For a 6MHz crystal oscillator or resonator, set this bit to 1 .
For a 12MHz crystal oscillator or resonator, clear this bit to 0 .
Note: Isochronous endpoint 2 and endpoint 3 are implemented by hardware, so FIFO2 and FIFO3 cannot read/write
via firmware.
UCC (22H) Register
The AWR register contains the current address and a remote wake up function control bit. The initial value of AWR is
00H . The address value extracted from the the USB command has not to be loaded into this register until the SETUP
stage has finished.
Bit No.
Label
R/W
Power-on
Functions
0
WKEN
R/W
0
USB remote-wake-up enable/disable (1/0)
1~7
AD0~AD6
R/W
0000000
USB device address
AWR (23H) Register
The STALLregister shows if the corresponding endpoint works properly or not. As soon as the endpoint works improp-
erly, the related bit in the STALL has to be set to 1 . The STALL register will be cleared by a USB reset signal.
Bit No.
Label
R/W
Power-on
Functions
0~4
STL0~STL4
R/W
00000
Set by the user when related USB endpoints were stalled.
Cleared by a USB reset and a Setup Token event.
5~7
STL5~STL7
000
Undefined bit, read as 0 .
STALL (24H) Register