\n

OTG

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x14 byte (0x0)
mem_usage : registers
protection :

Registers

OTG_CTL

OTG_STATUS

OTG_PHYCTL

OTG_INTEN

OTG_INTSTS


OTG_CTL

OTG Control Register
address_offset : 0x0 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

OTG_CTL OTG_CTL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 VBUSDROP BUSREQ HNPREQEN OTGEN WKEN

VBUSDROP : Drop VBUS Control If user application running on this OTG A-device wants to conserve power, set this bit to drop VBUS. BUSREQ (OTG_CTL[1]) will be also cleared no matter A-device or B-device.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not drop the VBUS

#1 : 1

Drop the VBUS

End of enumeration elements list.

BUSREQ : OTG Bus Request If OTG A-device wants to do data transfers via USB bus, setting this bit will drive VBUS high to detect USB device connection. If user won't use the bus any more, clearing this bit will drop VBUS to save power. This bit will be cleared when A-device goes to A_wait_vfall state. This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set or IDSTS (OTG_STATUS[1]) changed. If user of an OTG-B Device wants to request VBUS, setting this bit will run SRP protocol. This bit will be cleared if SRP failure (OTG A-device does not provide VBUS after B-device issues SRP in specified interval, defined in OTG specification). This bit will be also cleared if VBUSDROP (OTG_CTL[0]) bit is set or IDSTS (OTG_STATUS[1]) changed.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Not launch VBUS in OTG A-device or not request SRP in OTG B-device

#1 : 1

Launch VBUS in OTG A-device or request SRP in OTG B-device

End of enumeration elements list.

HNPREQEN : OTG HNP Request Enable Bit When USB frame as A-device, set this bit when A-device allows to process HNP protocolA-device changes role from Host to Peripheral. This bit will be cleared when OTG state changes from a_suspend to a_peripheral or goes back to a_idle state. When USB frame as B-device, set this bit after the OTG A-device successfully sends a SetFeature (b_hnp_enable) command to the OTG B-device to start role changeB-device changes role from Peripheral to Host. This bit will be cleared when OTG state changes from b_peripheral to b_wait_acon or goes back to b_idle state. Note: Refer to OTG specification to get a_suspend, a_peripheral, a_idle and b_idle state.
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

HNP request Disabled

#1 : 1

HNP request Enabled (A-device can change role from Host to Peripheral or B-device can change role from Peripheral to Host)

End of enumeration elements list.

OTGEN : OTG Function Enable Bit User needs to set this bit to enable OTG function while USB frame configured as OTG device. When USB frame is not configured as OTG device, this bit must be low.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG function Disabled

#1 : 1

OTG function Enabled

End of enumeration elements list.

WKEN : OTG ID Pin Wake-up Enable Bit
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG ID pin status change wake-up function Disabled

#1 : 1

OTG ID pin status change wake-up function Enabled

End of enumeration elements list.


OTG_STATUS

OTG Status Register
address_offset : 0x10 Bytes (0x0)
size : -1 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

OTG_STATUS OTG_STATUS read-only 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OVERCUR IDSTS SESSEND BVLD AVLD VBUSVLD ASPERI ASHOST

OVERCUR : Overcurrent Condition The voltage on VBUS cannot reach a minimum VBUS valid threshold, 4.4V minimum, within a maximum time of 100ms after OTG A-device drives VBUS high.
bits : 0 - 0 (1 bit)
access : read-only

Enumeration:

#0 : 0

OTG A-device drives VBUS successfully

#1 : 1

OTG A-device cannot drives VBUS high in this interval

End of enumeration elements list.

IDSTS : USB_ID Pin State of Mini-/Micro- Plug
bits : 1 - 1 (1 bit)
access : read-only

Enumeration:

#0 : 0

Mini-A/Micro-A plug is attached

#1 : 1

Mini-B/Micro-B plug is attached

End of enumeration elements list.

SESSEND : Session End Status When VBUS voltage is lower than 0.4V, this bit will be set to 1. Session end means no meaningful power on VBUS.
bits : 2 - 2 (1 bit)
access : read-only

Enumeration:

#0 : 0

Session is not end

#1 : 1

Session is end

End of enumeration elements list.

BVLD : B-device Session Valid Status
bits : 3 - 3 (1 bit)
access : read-only

Enumeration:

#0 : 0

B-device session is not valid

#1 : 1

B-device session is valid

End of enumeration elements list.

AVLD : A-Device Session Valid Status
bits : 4 - 4 (1 bit)
access : read-only

Enumeration:

#0 : 0

A-device session is not valid

#1 : 1

A-device session is valid

End of enumeration elements list.

VBUSVLD : VBUS Valid Status When VBUS is larger than 4.7V, this bit will be set to 1.
bits : 5 - 5 (1 bit)
access : read-only

Enumeration:

#0 : 0

VBUS is not valid

#1 : 1

VBUS is valid

End of enumeration elements list.

ASPERI : As Peripheral Status When OTG acts as peripheral, this bit is set.
bits : 6 - 6 (1 bit)
access : read-only

Enumeration:

#0 : 0

OTG not as peripheral

#1 : 1

OTG as peripheral

End of enumeration elements list.

ASHOST : As Host Status When OTG acts as Host, this bit is set.
bits : 7 - 7 (1 bit)
access : read-only

Enumeration:

#0 : 0

OTG not as Host

#1 : 1

OTG as Host

End of enumeration elements list.


OTG_PHYCTL

OTG PHY Control Register
address_offset : 0x4 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

OTG_PHYCTL OTG_PHYCTL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OTGPHYEN IDDETEN VBENPOL VBSTSPOL

OTGPHYEN : OTG PHY Enable Bit When USB frame is configured as either OTG device or ID dependent, user needs to set this bit before using OTG function. If device is configured as neither OTG device nor ID dependent, this bit is 'don't care'.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG PHY Disabled

#1 : 1

OTG PHY Enabled

End of enumeration elements list.

IDDETEN : ID Detection Enable Bit
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Detect ID pin status Disabled

#1 : 1

Detect ID pin status Enabled

End of enumeration elements list.

VBENPOL : Off-chip USB VBUS Power Switch Enable Polarity The OTG controller will enable off-chip USB VBUS power switch to provide VBUS power when need. A USB_VBUS_EN pin is used to control the off-chip USB VBUS power switch. The polarity of enabling off-chip USB VBUS power switch (high active or low active) depends on the selected component. Set this bit as following according to the polarity of off-chip USB VBUS power switch.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

#0 : 0

The off-chip USB VBUS power switch enable is active high

#1 : 1

The off-chip USB VBUS power switch enable is active low

End of enumeration elements list.

VBSTSPOL : Off-chip USB VBUS Power Switch Status Polarity The polarity of off-chip USB VBUS power switch valid signal depends on the selected component. A USB_VBUS_ST pin is used to monitor the valid signal of the off-chip USB VBUS power switch. Set this bit as following according to the polarity of off-chip USB VBUS power switch.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

#0 : 0

The polarity of off-chip USB VBUS power switch valid status is high

#1 : 1

The polarity of off-chip USB VBUS power switch valid status is low

End of enumeration elements list.


OTG_INTEN

OTG Interrupt Enable Register
address_offset : 0x8 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

OTG_INTEN OTG_INTEN read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ROLECHGIEN VBEIEN SRPFIEN HNPFIEN GOIDLEIEN IDCHGIEN PDEVIEN HOSTIEN BVLDCHGIEN AVLDCHGIEN VBCHGIEN SECHGIEN SRPDETIEN

ROLECHGIEN : Role (Host or Peripheral) Changed Interrupt Enable Bit
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

VBEIEN : VBUS Error Interrupt Enable Bit Note: VBUS error means going to a_vbus_err state. Please refer to A-device state diagram in OTG specification.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

SRPFIEN : SRP Fail Interrupt Enable Bit
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

HNPFIEN : HNP Fail Interrupt Enable Bit
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

GOIDLEIEN : OTG Device Goes to IDLE State Interrupt Enable Bit Note: Going to idle state means going to a_idle or b_idle state. Please refer to A-device state diagram and B-device state diagram in OTG specification.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

IDCHGIEN : IDSTS Changed Interrupt Enable Bit If this bit is set to 1 and IDSTS (OTG_STATUS[1]) status is changed from high to low or from low to high, an interrupt will be asserted.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

PDEVIEN : Act As Peripheral Interrupt Enable Bit If this bit is set to 1 and the device is changed as a peripheral, an interrupt will be asserted.
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

#0 : 0

This device as a peripheral interrupt Disabled

#1 : 1

This device as a peripheral interrupt Enabled

End of enumeration elements list.

HOSTIEN : Act As Host Interrupt Enable Bit If this bit is set to 1 and the device is changed as a host, an interrupt will be asserted.
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

#0 : 0

This device as a host interrupt Disabled

#1 : 1

This device as a host interrupt Enabled

End of enumeration elements list.

BVLDCHGIEN : B-device Session Valid Status Changed Interrupt Enable Bit If this bit is set to 1 and BVLD (OTG_STATUS[3]) status is changed from high to low or from low to high, an interrupt will be asserted.
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

AVLDCHGIEN : A-Device Session Valid Status Changed Interrupt Enable Bit If this bit is set to 1 and AVLD (OTG_STATUS[4]) status is changed from high to low or from low to high, an interrupt will be asserted.
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

VBCHGIEN : VBUSVLD Status Changed Interrupt Enable Bit If this bit is set to 1 and VBUSVLD (OTG_STATUS[5]) status is changed from high to low or from low to high, an interrupt will be asserted.
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

SECHGIEN : SESSEND Status Changed Interrupt Enable Bit If this bit is set to 1 and SESSEND (OTG_STATUS[2]) status is changed from high to low or from low to high, an interrupt will be asserted.
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.

SRPDETIEN : SRP Detected Interrupt Enable Bit
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

#0 : 0

Interrupt Disabled

#1 : 1

Interrupt Enabled

End of enumeration elements list.


OTG_INTSTS

OTG Interrupt Status Register
address_offset : 0xC Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

OTG_INTSTS OTG_INTSTS read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ROLECHGIF VBEIF SRPFIF HNPFIF GOIDLEIF IDCHGIF PDEVIF HOSTIF BVLDCHGIF AVLDCHGIF VBCHGIF SECHGIF SRPDETIF

ROLECHGIF : OTG Role Change Interrupt Status This flag is set when the role of an OTG device changed from a host to a peripheral, or changed from a peripheral to a host while USB_ID pin status does not change. Note: Write 1 to clear this flag.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG device role not changed

#1 : 1

OTG device role changed

End of enumeration elements list.

VBEIF : VBUS Error Interrupt Status This bit will be set when voltage on VBUS cannot reach a minimum valid threshold 4.4V within a maximum time of 100ms after OTG A-device starting to drive VBUS high. Note: Write 1 to clear this flag and recover from the VBUS error state.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG A-device drives VBUS over threshold voltage before this interval expires

#1 : 1

OTG A-device cannot drive VBUS over threshold voltage before this interval expires

End of enumeration elements list.

SRPFIF : SRP Fail Interrupt Status After initiating SRP, an OTG B-device will wait for the OTG A-device to drive VBUS high at least TB_SRP_FAIL minimum, defined in OTG specification. This flag is set when the OTG B-device does not get VBUS high after this interval. Note: Write 1 to clear this flag.
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG B-device gets VBUS high before this interval

#1 : 1

OTG B-device does not get VBUS high before this interval

End of enumeration elements list.

HNPFIF : HNP Fail Interrupt Status When A-device has granted B-device to be host and USB bus is in SE0 (both USB_D+ and USB_D- low) state, this bit will be set when A-device does not connect after specified interval expires. Note: Write 1 to clear this flag.
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

#0 : 0

A-device connects to B-device before specified interval expires

#1 : 1

A-device does not connect to B-device before specified interval expires

End of enumeration elements list.

GOIDLEIF : OTG Device Goes to IDLE Interrupt Status Flag is set if the OTG device transfers from non-idle state to idle state. The OTG device will be neither a host nor a peripheral. Note 1: Going to idle state means going to a_idle or b_idle state. Please refer to OTG specification. Note 2: Write 1 to clear this flag.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

#0 : 0

OTG device does not go back to idle state (a_idle or b_idle)

#1 : 1

OTG device goes back to idle state (a_idle or b_idle)

End of enumeration elements list.

IDCHGIF : ID State Change Interrupt Status Note: Write 1 to clear this flag.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

#0 : 0

IDSTS (OTG_STATUS[1]) not toggled

#1 : 1

IDSTS (OTG_STATUS[1]) from high to low or from low to high

End of enumeration elements list.

PDEVIF : Act As Peripheral Interrupt Status Note: Write 1 to clear this flag.
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

#0 : 0

This device does not act as a peripheral

#1 : 1

This device acts as a peripheral

End of enumeration elements list.

HOSTIF : Act As Host Interrupt Status Note: Write 1 to clear this flag.
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

#0 : 0

This device does not act as a host

#1 : 1

This device acts as a host

End of enumeration elements list.

BVLDCHGIF : B-device Session Valid State Change Interrupt Status Note: Write 1 to clear this status.
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

#0 : 0

BVLD (OTG_STATUS[3]) not toggled

#1 : 1

BVLD (OTG_STATUS[3]) from high to low or low to high

End of enumeration elements list.

AVLDCHGIF : A-Device Session Valid State Change Interrupt Status Note: Write 1 to clear this status.
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

#0 : 0

AVLD (OTG_STATUS[4]) not toggled

#1 : 1

AVLD (OTG_STATUS[4]) from high to low or low to high

End of enumeration elements list.

VBCHGIF : VBUSVLD State Change Interrupt Status Note: Write 1 to clear this status.
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

#0 : 0

VBUSVLD (OTG_STATUS[5]) not toggled

#1 : 1

VBUSVLD (OTG_STATUS[5]) from high to low or from low to high

End of enumeration elements list.

SECHGIF : SESSEND State Change Interrupt Status Note: Write 1 to clear this flag.
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

#0 : 0

SESSEND (OTG_STATUS[2]) not toggled

#1 : 1

SESSEND (OTG_STATUS[2]) from high to low or from low to high

End of enumeration elements list.

SRPDETIF : SRP Detected Interrupt Status Note: Write 1 to clear this status.
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

#0 : 0

SRP not detected

#1 : 1

SRP detected

End of enumeration elements list.



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.