hprt

         Host Port Control and Status Register
      
Module Instance Base Address Register Address
i_usbotg_0_hostgrp 0xFFB00400 0xFFB00440
i_usbotg_1_hostgrp 0xFFB40400 0xFFB40440

Offset: 0x40

Access: RW

Important: The value of a reserved bit must be maintained in software. When you modify registers containing reserved bit fields, you must use a read-modify-write operation to preserve state and prevent indeterminate system behavior.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

prtspd

RO 0x0

prttstctl

RW 0x0

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

prttstctl

RW 0x0

prtpwr

RW 0x0

prtlnsts

RO 0x0

Reserved

prtrst

RW 0x0

prtsusp

RW 0x0

prtres

RW 0x0

prtovrcurrchng

RW 0x0

prtovrcurract

RO 0x0

prtenchng

RW 0x0

prtena

RW 0x0

prtconndet

RW 0x0

prtconnsts

RO 0x0

hprt Fields

Bit Name Description Access Reset
18:17 prtspd
Port Speed (PrtSpd)
Indicates the speed of the device attached to this port.
 2'b00: High speed
 2'b01: Full speed
 2'b10: Low speed
 2'b11: Reserved
Value Description
0x0 HIGHSPD
0x1 FULLSPD
0x2 LOWSPD
0x3 RESERVED
RO 0x0
16:13 prttstctl
Port Test Control (PrtTstCtl)
The application writes a nonzero value to this field to put the
port into a Test mode, and the corresponding pattern is
signaled on the port.
 4'b0000: Test mode disabled
 4'b0001: Test_J mode
 4'b0010: Test_K mode
 4'b0011: Test_SE0_NAK mode
 4'b0100: Test_Packet mode
 4'b0101: Test_Force_Enable
 Others: Reserved
Value Description
0x0 DISABLED
0x1 TESTJ
0x2 TESTK
0x3 TESTSN
0x4 TESTPM
0x5 TESTFENB
RW 0x0
12 prtpwr
Port Power (PrtPwr)
The application uses this field to control power to this port (write 1'b1 to set to 1'b1
and write 1'b0 to set to 1'b0), and the core can clear this bit on an over current
condition.
 1'b0: Power off
 1'b1: Power on
Value Description
0x0 OFF
0x1 ON
RW 0x0
11:10 prtlnsts
Port Line Status (PrtLnSts)
Indicates the current logic level USB data lines
 Bit [10]: Logic level of D+
 Bit [11]: Logic level of D-
Value Description
0x1 PLUSD
0x2 MINUSD
RO 0x0
8 prtrst
Port Reset (PrtRst)
When the application sets this bit, a reset sequence is
started on this port. The application must time the reset
period and clear this bit after the reset sequence is
complete.
 1'b0: Port not in reset
 1'b1: Port in reset
The application must leave this bit Set For at least a
minimum duration mentioned below to start a reset on the
port. The application can leave it Set For another 10 ms in
addition to the required minimum duration, before clearing
the bit, even though there is no maximum limit Set by the
USB standard.This bit is cleared by the core even if there is
no device connected to the Host.
 High speed: 50 ms
 Full speed/Low speed: 10 ms
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
7 prtsusp
Port Suspend (PrtSusp)
The application sets this bit to put this port in Suspend
mode. The core only stops sending SOFs when this is Set.
To stop the PHY clock, the application must Set the Port
Clock Stop bit, which asserts the suspend input pin of the
PHY.
The read value of this bit reflects the current suspend status
of the port. This bit is cleared by the core after a remote
wakeup signal is detected or the application sets the Port
Reset bit or Port Resume bit in this register or the
Resume/Remote Wakeup Detected Interrupt bit or
Disconnect Detected Interrupt bit in the Core Interrupt
register (GINTSTS.WkUpInt or GINTSTS.DisconnInt,
respectively).This bit is cleared by the core even if there is
no device connected to the Host.
 1'b0: Port not in Suspend mode
 1'b1: Port in Suspend mode
Value Description
0x0 INACTIVE
0x1 ACTIVE
RW 0x0
6 prtres
Port Resume (PrtRes)
The application sets this bit to drive resume signaling on the
port. The core continues to drive the resume signal until the
application clears this bit.
If the core detects a USB remote wakeup sequence, as
indicated by the Port Resume/Remote Wakeup Detected
Interrupt bit of the Core Interrupt register
(GINTSTS.WkUpInt), the core starts driving resume
signaling without application intervention and clears this bit
when it detects a disconnect condition. The read value of
this bit indicates whether the core is currently driving
resume signaling.
 1'b0: No resume driven
 1'b1: Resume driven
When LPM is enabled, In L1 state the behavior of this bit is as follows:
The application sets this bit to drive resume signaling on the port.
The core continues to drive the resume signal until a pre-determined time
specified in GLPMCFG.HIRD_Thres[3:0] field. If the core detects a USB remote
wakeup sequence, as indicated by the Port L1Resume/Remote L1Wakeup Detected 
Interrupt bit of the Core Interrupt register (GINTSTS.L1WkUpInt), 
the core starts driving resume signaling without application intervention
and clears this bit at the end of resume.This bit can be set by both core or application
and also cleared by core or application. This bit is cleared by the core even if there is
no device connected to the Host.
Value Description
0x0 NORESUME
0x1 RESUME
RW 0x0
5 prtovrcurrchng
Port Overcurrent Change (PrtOvrCurrChng)
The core sets this bit when the status of the Port
Overcurrent Active bit (bit 4) in this register changes.This bit can be set only by the core and the application should write 1 to clear it
Value Description
0x0 INACTIVE
0x1 ACTIVE
RW 0x0
4 prtovrcurract
Port Overcurrent Active (PrtOvrCurrAct)
Indicates the overcurrent condition of the port.
 1'b0: No overcurrent condition
 1'b1: Overcurrent condition
Value Description
0x0 INACTIVE
0x1 ACTIVE
RO 0x0
3 prtenchng
Port Enable/Disable Change (PrtEnChng)
The core sets this bit when the status of the Port Enable bit
[2] of this register changes.This bit can be set only by the core and the application should write 1 to clear it.
Value Description
0x0 INACTIVE
0x1 ACTIVE
RW 0x0
2 prtena
Port Enable (PrtEna)
A port is enabled only by the core after a reset sequence,
and is disabled by an overcurrent condition, a disconnect
condition, or by the application clearing this bit. The
application cannot Set this bit by a register write. It can only
clear it to disable the port by writing 1.. This bit does not trigger any
interrupt to the application.
 1'b0: Port disabled
 1'b1: Port enabled
Value Description
0x0 DISABLED
0x1 ENABLED
RW 0x0
1 prtconndet
Port Connect Detected (PrtConnDet)
The core sets this bit when a device connection is detected
to trigger an interrupt to the application using the Host Port
Interrupt bit of the Core Interrupt register (GINTSTS.PrtInt).This bit can be set only by the core and the application should write 1 to clear it.The application must write a 1 to this bit to clear the
interrupt.
Value Description
0x0 ACTIVE
0x1 INACTIVE
RW 0x0
0 prtconnsts
Port Connect Status (PrtConnSts)
 0: No device is attached to the port.
 1: A device is attached to the port.
Value Description
0x0 NOTATTACHED
0x1 ATTACHED
RO 0x0