English
Language : 

MG74PG1A08 Datasheet, PDF (98/127 Pages) Megawin Technology Co., Ltd – Interrupt controller
19.6. Access USB SFR
Table 19–1 Table 19–1shows the USB SFR and their indirect address from C0H~FFH. USB SFR can be indirectly
accessed according to a 6-bit address hold in USBADR. Read/Write USBDAT will target the register indicated by
USBADR.
USB Write SFR procedure
1. Wait for UBSY==0
2. Write USB SFR address into USBADR
3. Write data into USBDAT
4. Repeat to step1 to write next data(step 2 can be skipped, when writing to the same USB SFR address)
USB Read SFR procedure
1. Wait for UBSY==0
2. Write USB SFR address into USBADR
3. Read data from USBDAT
4. Repeat to step 1 to read next data(step 2 can be skipped, when reading from the same USB SFR address)
Table 3–1
USBADR: USB indirect Address Register
SFR Page
= 0~F
SFR Address = 0xAB
POR+RESET = 0x00-0000
7
6
5
4
3
2
UBSY
--
USFRA5 USFRA4 USFRA3 USFRA2
R
R/W
R/W
R/W
R/W
R/W
1
USFRA1
R/W
0
USFRA0
R/W
Bit 7: UBSY, USB core BUSY flag.
0: The data access request in USB core is finished.
1: USB core is BUSY on accessing software read/write request.
Bit 5~0: USFRA[5:0], USB SFR indirect address.
USBDAT: USB Data Register
SFR Page
= 0~F
SFR Address = 0xAA
7
6
5
UDAT7 UDAT6 UDAT5
R/W
R/W
R/W
Bit 7~0: UDAT[7:0], USB SFR Data.
POR+RESET = xxxx-xxxx
4
3
2
UDAT4 UDAT3 UDAT2
R/W
R/W
R/W
1
UDAT1
R/W
0
UDAT0
R/W
98
MG74PG1A08 Data Sheet
MEGAWIN