gotgctl

The OTG Control and Status register controls the behavior and reflects the status of the OTG function.
Module Instance Base Address Register Address
usb0 0xFFB00000 0xFFB00000
usb1 0xFFB40000 0xFFB40000

Offset: 0x0

Access: RW

Important: To prevent indeterminate system behavior, reserved areas of memory must not be accessed by software or hardware. Any area of the memory map that is not explicitly defined as a register space or accessible memory is considered reserved.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

otgver

RW 0x0

bsesvld

RO 0x0

asesvld

RO 0x0

dbnctime

RO 0x0

conidsts

RO 0x1

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

Reserved

devhnpen

RW 0x0

hstsethnpen

RW 0x0

hnpreq

RW 0x0

hstnegscs

RO 0x0

bvalidovval

RW 0x0

bvalidoven

RW 0x0

avalidovval

RW 0x0

avalidoven

RW 0x0

vbvalidovval

RW 0x0

vbvalidoven

RW 0x0

sesreq

RW 0x0

sesreqscs

RO 0x0

gotgctl Fields

Bit Name Description Access Reset
20 otgver

Indicates the OTG revision. In OTG Version 1.3. the core supports Data line pulsing and VBus pulsing for SRP. In OTG Version 2.0 the core supports only Data line pulsing for SRP.

Value Description
0x0 OTG Version 1.3. In this version the core supports Data line
0x1 OTG Version 2.0. In this version the core supports only Data line pulsing for SRP
RW 0x0
19 bsesvld

Mode: Device only. Indicates the Device mode transceiver status. In OTG mode, you can use this bit to determine IF the device is connected or disconnected. If you do not enable OTG features (such as SRP and HNP), the read reset value will be 1. The vbus assigns the values internally for non-SRP or non-HNP configurations.

Value Description
0x0 B-session is not valid
0x1 B-session is valid
RO 0x0
18 asesvld

Mode: Host only. Indicates the Host mode transceiver status. If you do not enabled OTG features (such as SRP and HNP), the read reset value will be 1.The vbus assigns the values internally for non-SRP or non-HNP configurations.

Value Description
0x0 A-session is not valid
0x1 A-session is valid
RO 0x0
17 dbnctime

Mode: Host only. Indicates the debounce time of a detected connection.

Value Description
0x0 Long debounce time, used FOR physical connections (100 ms + 2.5 s)
0x1 Short debounce time, used FOR soft connections (2.5 s
RO 0x0
16 conidsts

Mode: Host and Device. Indicates the connector ID status on a connect event.This bit is valid only for Host and Device mode.

Value Description
0x0 The DWC_otg core is in A-Device mode
0x1 The otg core is in B-Device mode
RO 0x1
11 devhnpen

Mode: Device only. The application sets this bit when it successfully receives a SetFeature.SetHNPEnable command from the connected USB host.

Value Description
0x0 HNP is not enabled in the application
0x1 HNP Enabled
RW 0x0
10 hstsethnpen

Mode: Host only. The application sets this bit when it has successfully enabled HNP (using the SetFeature.SetHNPEnable command) on the connected device.

Value Description
0x0 Host Set HNP is not enabled
0x1 Host Set HNP is enabled
RW 0x0
9 hnpreq

Mode: Device only. The application sets this bit to initiate an HNP request to the connected USB host. The application can clear this bit by writing a 0 when the Host Negotiation Success Status Change bit in the OTG Interrupt register (GOTGINT.HstNegSucStsChng) is SET.The core clears this bit when the HstNegSucStsChng bit iscleared.

Value Description
0x0 No HNP request
0x1 HNP request
RW 0x0
8 hstnegscs

Mode: Device only. Host Negotiation Success (HstNegScs) The core sets this bit when host negotiation is successful. The core clears this bit when the HNP Request (HNPReq) bit in this register is SET.

Value Description
0x0 Host negotiation failure
0x1 Host negotiation success
RO 0x0
7 bvalidovval

This bit is used to set Override value for Bvalid signalwhen GOTGCTL.BvalidOvEn is set.

Value Description
0x0 Bvalid value when GOTGCTL.AvalidOvEn =1
0x1 Bvalid value when GOTGCTL.AvalidOvEn =1
RW 0x0
6 bvalidoven

This bit is used to enable/disable the software to override the Bvalid signal using the GOTGCTL.BvalidOvVal.

Value Description
0x0 Override is disabled and bvalid signal from the respective PHY selected is used internally by the core
0x1 Internally Bvalid received from the PHY is overridden with GOTGCTL.BvalidOvVal
RW 0x0
5 avalidovval

This bit is used to set Override value for Avalid signal when GOTGCTL.BvalidOvEn is set.

Value Description
0x0 Avalid value is 1'b0 when GOTGCTL.BvalidOvEn =1
0x1 Avalid value is 1'b1 when GOTGCTL.BvalidOvEn =1
RW 0x0
4 avalidoven

This bit is used to enable/disable the software to override the Avalid signal using the GOTGCTL.AvalidOvVal.

Value Description
0x0 Override is disabled and Avalid signal from the respective PHY is used internally by the core.
0x1 Internally Avalid received from the PHY is overridden with GOTGCTL.AvalidOvVa
RW 0x0
3 vbvalidovval

This bit is used to set Override value for vbus valid signal when GOTGCTL.VbvalidOvEn is set.

Value Description
0x0 vbusvalid value when GOTGCTL.VbvalidOvEn = 1
0x1 vbusvalid value when GOTGCTL.VbvalidOvEn is 1
RW 0x0
2 vbvalidoven

This bit is used to enable/disable the software to override the vbus-valid signal using the GOTGCTL.vbvalidOvVal..

Value Description
0x0 Override is disabled and bvalid signal from the respective PHY selected is used internally by the force
0x1 The vbus-valid signal received from the PHY is overridden with GOTGCTL.vbvalidOvVal
RW 0x0
1 sesreq

The application sets this bit to initiate a session request on the USB. The application can clear this bit by writing a 0 when the Host Negotiation Success Status Change bit in the OTG Interrupt register (GOTGINT.HstNegSucStsChng) is SET. The core clears this bit when the HstNegSucStsChng bit is cleared. If you use the USB 1.1 Full-Speed Serial Transceiver interface to initiate the session request, the application must wait until the VBUS discharges to 0.2 V, after the B-Session Valid bit in this register (GOTGCTL.BSesVld) is cleared. This discharge time varies between different PHYs and can be obtained from the PHY vendor.

Value Description
0x0 No session request
0x1 Session request
RW 0x0
0 sesreqscs

This bit is set when a session request initiation is successful. This bit is valid only For Device Only configuration when OTG_MODE == 3 or OTG_MODE == 4. Applies for device only.

Value Description
0x0 Session request failure
0x1 Session request success
RO 0x0