PSPD=B_0x0, PCSTS=B_0x0, PRES=B_0x0, PENA=B_0x0, PRST=B_0x0, PPWR=B_0x0, PSUSP=B_0x0, POCA=B_0x0, PTCTL=B_0x0
OTG host port control and status register
PCSTS | Port connect status 0 (B_0x0): No device is attached to the port 1 (B_0x1): A device is attached to the port |
PCDET | Port connect detected The core sets this bit when a device connection is detected to trigger an interrupt to the application using the host port interrupt bit in the core interrupt register (HPRTINT bit in OTG_GINTSTS). The application must write a 1 to this bit to clear the interrupt. |
PENA | Port enable 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. This bit does not trigger any interrupt to the application. 0 (B_0x0): Port disabled 1 (B_0x1): Port enabled |
PENCHNG | Port enable/disable change The core sets this bit when the status of the port enable bit 2 in this register changes. |
POCA | Port overcurrent active Indicates the overcurrent condition of the port. 0 (B_0x0): No overcurrent condition 1 (B_0x1): Overcurrent condition |
POCCHNG | Port overcurrent change The core sets this bit when the status of the port overcurrent active bit (bit 4) in this register changes. |
PRES | Port resume 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 (WKUPINT bit in OTG_GINTSTS), 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. When LPM is enabled and the core is in L1 state, the behavior of this bit is as follow:
0 (B_0x0): No resume driven 1 (B_0x1): Resume driven |
PSUSP | Port suspend 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 (WKUPINT or DISCINT in OTG_GINTSTS, respectively). 0 (B_0x0): Port not in suspend mode 1 (B_0x1): Port in suspend mode |
PRST | Port reset 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. The application must leave this bit set for a minimum duration of at least 10 ms 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. High speed: 50 ms Full speed/Low speed: 10 ms 0 (B_0x0): Port not in reset 1 (B_0x1): Port in reset |
PLSTS | Port line status Indicates the current logic level USB data lines Bit 10: Logic level of OTG_DP Bit 11: Logic level of OTG_DM |
PPWR | Port power The application uses this field to control power to this port, and the core clears this bit on an overcurrent condition. 0 (B_0x0): Power off 1 (B_0x1): Power on |
PTCTL | Port test control 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. Others: Reserved 0 (B_0x0): Test mode disabled 1 (B_0x1): Test_J mode 2 (B_0x2): Test_K mode 3 (B_0x3): Test_SE0_NAK mode 4 (B_0x4): Test_Packet mode 5 (B_0x5): Test_Force_Enable |
PSPD | Port speed Indicates the speed of the device attached to this port. 0 (B_0x0): High speed 1 (B_0x1): Full speed 2 (B_0x2): Low speed 3 (B_0x3): FIELD Reserved |