USBREG — USB regulator control

The USB peripheral has its own voltage regulator. When using the USB peripheral, a 5 V USB supply needs to be provided on the VBUS pin.

The USB peripheral has a dedicated internal voltage regulator for converting the VBUS supply to 3.3 V to be used by the USB signalling interface (D+ and D- lines, and pull-up on D+). The rest of the USB peripheral (USBD) is supplied through the main supply like other on-chip features. As a consequence, both VBUS and combinations of VDDH and VDD are required for USB peripheral operation. For details on configuring the main supplies, see Power supply modes and regulators.

When VBUS rises into its valid range, the software is notified through the USBDETECTED event. The USBREMOVED event is sent when VBUS goes below its valid range. Use these events to implement the USBD startup sequence described in USBD power-up sequence.

When VBUS rises into its valid range while the device is in System OFF, the device resets and transitions to System ON mode. The RESETREAS register will have the VBUS bit set to indicate the source of the wakeup.

See VBUS detection specifications for the voltage level where events are sent (VBUS,DETECT and VBUS,REMOVE) or where the system causes a wakeup from System OFF (VBUS,DETECT).

When the USBD peripheral is enabled through the ENABLE register and VBUS is detected, the regulator is turned on. A USBPWRRDY event is sent when the regulator's worst case settling time has elapsed, indicating to the software that it can enable the USB pull-up to signal a USB connection to the host.

The software can read the state of the VBUS detection and regulator output readiness at any time through the USBREGSTATUS register.

Figure 1. USB voltage regulator
USB voltage regulator

To ensure stability, the input and output of the USB regulator need to be decoupled with a suitable decoupling capacitor CVBUS. See Reference circuitry for the recommended values.

Registers

Instances

InstanceDomainBase addressTrustZoneSplit accessDescription
MapAttDMA
USBREGULATOR : S
USBREGULATOR : NS
APPLICATION0x50037000
0x40037000
USSNANoUSB regulator control

Register overview

RegisterOffsetTZDescription
EVENTS_USBDETECTED0x100Voltage supply detected on VBUS
EVENTS_USBREMOVED0x104Voltage supply removed from VBUS
EVENTS_USBPWRRDY0x108USB 3.3 V supply ready
PUBLISH_USBDETECTED0x180Publish configuration for event USBDETECTED
PUBLISH_USBREMOVED0x184Publish configuration for event USBREMOVED
PUBLISH_USBPWRRDY0x188Publish configuration for event USBPWRRDY
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
USBREGSTATUS0x400USB supply status

EVENTS_USBDETECTED

Address offset: 0x100

Voltage supply detected on VBUS

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_USBDETECTEDVoltage supply detected on VBUS
NotGenerated0Event not generated
Generated1Event generated

EVENTS_USBREMOVED

Address offset: 0x104

Voltage supply removed from VBUS

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_USBREMOVEDVoltage supply removed from VBUS
NotGenerated0Event not generated
Generated1Event generated

EVENTS_USBPWRRDY

Address offset: 0x108

USB 3.3 V supply ready

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_USBPWRRDYUSB 3.3 V supply ready
NotGenerated0Event not generated
Generated1Event generated

PUBLISH_USBDETECTED

Address offset: 0x180

Publish configuration for event USBDETECTED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event USBDETECTED will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_USBREMOVED

Address offset: 0x184

Publish configuration for event USBREMOVED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event USBREMOVED will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_USBPWRRDY

Address offset: 0x188

Publish configuration for event USBPWRRDY

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event USBPWRRDY will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWUSBDETECTEDEnable or disable interrupt for event USBDETECTED
Disabled0Disable
Enabled1Enable
BRWUSBREMOVEDEnable or disable interrupt for event USBREMOVED
Disabled0Disable
Enabled1Enable
CRWUSBPWRRDYEnable or disable interrupt for event USBPWRRDY
Disabled0Disable
Enabled1Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWUSBDETECTEDWrite '1' to enable interrupt for event USBDETECTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWUSBREMOVEDWrite '1' to enable interrupt for event USBREMOVED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWUSBPWRRDYWrite '1' to enable interrupt for event USBPWRRDY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWUSBDETECTEDWrite '1' to disable interrupt for event USBDETECTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWUSBREMOVEDWrite '1' to disable interrupt for event USBREMOVED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWUSBPWRRDYWrite '1' to disable interrupt for event USBPWRRDY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

USBREGSTATUS

Address offset: 0x400

USB supply status

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARVBUSDETECTVBUS input detection status (USBDETECTED and USBREMOVED events are derived from this information)
NoVbus0VBUS voltage below valid threshold
VbusPresent1VBUS voltage above valid threshold
BROUTPUTRDYUSB supply output settling time elapsed
NotReady0USBREG output settling time not elapsed
Ready1USBREG output settling time elapsed (same information as USBPWRRDY event)

Electrical specification

USB operating conditions

SymbolDescriptionMin.Typ.Max.Units
VBUSSupply voltage on VBUS pin4.3555.5V
VDPDMVoltage on D+ and D- linesVSS - 0.3VUSB33 + 0.3V

USB regulator specifications

SymbolDescriptionMin.Typ.Max.Units
IUSB,QUIESUSB regulator quiescent current drawn from VBUS (USBD enabled)170µA
tUSBPWRRDYTime from USB enabled to USBPWRRDY event triggered, VBUS supply provided1ms
VUSB33On voltage at the USB regulator output (DECUSB pin)3.03.33.6V
RSOURCE,VBUSMaximum source resistance on VBUS, including cable, when VDDH is not connected to VBUS6Ω
RSOURCE,VBUSVDDHMaximum source resistance on VBUS, including cable, when VDDH is connected to VBUS3.8Ω
CDECUSBDecoupling capacitor on the DECUSB pin2.354.75.5µF

VBUS detection specifications

SymbolDescriptionMin.Typ.Max.Units
VBUS,DETECTVoltage at which rising VBUS gets reported by USBDETECTED3.44.04.3V
VBUS,REMOVEVoltage at which decreasing VBUS gets reported by USBREMOVED3.03.63.9V