English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (245/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
11.1 Control Registers
The USB module includes the following Special Func-
tion Registers (SFRs):
• U1OTGIR: USB OTG Interrupt Flag Register
• U1OTGIE: USB OTG Interrupt Enable Register
• U1OTGSTAT: USB Comparator and Pin Status
Register
• U1OTGCON: USB Resistor and Pin Control
Register
• U1PWRC: USB Power Control Register
• U1IR: USB Pending Interrupt Register
• U1IE: USB Interrupt Enable Register
• U1EIR: USB Pending Error Interrupt Register
• U1EIE: USB Interrupt Enable Register
• U1STAT: USB Status FIFO Register
• U1CON: USB Module Control Register
• U1ADDR: USB Address Register
• U1FRMH and U1FRML: USB Frame Count
Registers
• U1TOK: USB Host Control Register
• U1SOF: USB SOF Counter Register
• U1BDTP1, U1BDTP2, and U1BDTP3: USB Buffer
Descriptor Table Pointer Register
• U1CNFG1: USB Debug and Idle Register
• U1EP0-U1EP15: USB Endpoint Control Registers
11.1.1 U1OTGIR REGISTER
U1OTGIR (Register 11-1) records changes on the ID,
data and VBUS pins, enabling software to determine
which event caused an interrupt. The interrupt bits are
cleared by writing a ‘1’ to the corresponding interrupt.
11.1.2 U1OTGIE REGISTER
U1OTGIE (Register 11-2) enables the corresponding
interrupt Status bits defined in the U1OTGIR register to
generate an interrupt.
11.1.3 U1OTGSTAT REGISTER
U1OTGSTAT (Register 11-3) provides access to the
status of the VBUS voltage comparators and the
debounced status of the ID pin.
11.1.4 U1OTGCON REGISTER
U1OTGCON (Register 11-4) controls the operation of
the VBUS pin, and the pull-up and pull-down resistors.
11.1.5 U1PWRC REGISTER
U1PWRC (Register 11-5) controls the power-saving
modes, as well as the module enable/disable control.
11.1.6 U1IR REGISTER
U1IR (Register 11-6) contains information on pending
interrupts. Once an interrupt bit is set, it can be cleared
by writing a ‘1’ to the corresponding bit.
11.1.7 U1IE REGISTER
U1IE (Register 11-7) values provide gating of the vari-
ous interrupt signals onto the USB interrupt signal.
These values do not interact with the USB module.
Setting any of these bits enables the corresponding
interrupt source in the U1IR register.
11.1.8 U1EIR REGISTER
U1EIR (Register 11-8) contains information on pending
error interrupt values. Once an interrupt bit is set, it can
be cleared by writing a ‘1’ to the corresponding bit.
11.1.9 U1EIE REGISTER
U1EIE (Register 11-9) values provide gating of the var-
ious interrupt signals onto the USB interrupt signal.
These values do not interact with the USB module. Set-
ting any of these bits enables the respective interrupt
source in the U1EIR register if UERR is also set in the
U1IE register.
11.1.10 U1STAT REGISTER
U1STAT (Register 11-10) is a 16-deep First In, First
Out (FIFO) register. It is read-only by the CPU and
read/write by the USB module. U1STAT is only valid
when the U1IR<TRNIF> bit is set.
11.1.11 U1CON REGISTER
U1CON (Register 11-11) provides miscellaneous
control and information about the module.
11.1.12 U1ADDR REGISTER
U1ADDR (Register 11-12) is a read/write register from
the CPU side and read-only from the USB module side.
Although the register values affect the settings of the
USB module, the content of the registers does not
change during access.
In Device mode, this address defines the USB device
address as assigned by the host during the SETUP
phase. The firmware writes the address in response to
the SETUP request. The address is automatically reset
when a USB bus Reset is detected. In Host mode, the
module transmits the address provided in this register
with the corresponding token packet. This allows the
USB module to uniquely address the connected
device.
11.1.13 U1FRMH AND U1FRML REGISTERS
U1FRMH and U1FRML (Register 11-13 and
Register 11-14) are read-only registers. The frame
number is formed by concatenating the two 8-bit regis-
ters. The high-order byte is in the U1FRMH register,
and the low-order byte is in U1FRML.
© 2008 Microchip Technology Inc.
Preliminary
DS61143E-page 243