Expand description
USB FS/LS controller device registers
Modules§
- addr_
endp - Device address and endpoint control
- buff_
cpu_ should_ handle - Which of the double buffers should be handled. Only valid if using an interrupt per buffer (i.e. not per 2 buffers). Not valid for host interrupt endpoint polling because they are only single buffered.
- buff_
status - Buffer status register. A bit set here indicates that a buffer has completed on the endpoint (if the buffer interrupt is enabled). It is possible for 2 buffers to be completed, so clearing the buffer status bit may instantly re set it on the next clock cycle.
- ep_
abort - Device only: Can be set to ignore the buffer control register for this endpoint in case you would like to revoke a buffer. A NAK will be sent for every access to the endpoint until this bit is cleared. A corresponding bit in
EP_ABORT_DONE
is set when it is safe to modify the buffer control register. - ep_
abort_ done - Device only: Used in conjunction with
EP_ABORT
. Set once an endpoint is idle so the programmer knows it is safe to modify the buffer control register. - ep_
stall_ arm - Device: this bit must be set in conjunction with the
STALL
bit in the buffer control register to send a STALL on EP0. The device controller clears these bits when a SETUP packet is received because the USB spec requires that a STALL condition is cleared when a SETUP packet is received. - ep_
status_ stall_ nak - Device: bits are set when the
IRQ_ON_NAK
orIRQ_ON_STALL
bits are set. For EP0 this comes fromSIE_CTRL
. For all other endpoints it comes from the endpoint control register. - host_
addr_ endp - Interrupt endpoints. Only valid in HOST mode.
- int_
ep_ ctrl - interrupt endpoint control register
- inte
- Interrupt Enable
- intf
- Interrupt Force
- intr
- Raw Interrupts
- ints
- Interrupt status after masking & forcing
- main_
ctrl - Main control register
- nak_
poll - Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK.
- sie_
ctrl - SIE control register
- sie_
status - SIE status register
- sof_rd
- Read the last SOF (Start of Frame) frame number seen. In device mode the last SOF received from the host. In host mode the last SOF sent by the host.
- sof_wr
- Set the SOF (Start of Frame) frame number in the host controller. The SOF packet is sent every 1ms and the host will increment the frame number by 1 each time.
- usb_
muxing - Where to connect the USB controller. Should be to_phy by default.
- usb_pwr
- Overrides for the power signals in the event that the VBUS signals are not hooked up to GPIO. Set the value of the override and then the override enable to switch over to the override value.
- usbphy_
direct - This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit.
- usbphy_
direct_ override - Override enable for each control in usbphy_direct
- usbphy_
trim - Used to adjust trim values of USB phy pull down resistors.
Structs§
- Register
Block - Register block
Type Aliases§
- ADDR_
ENDP - ADDR_ENDP (rw) register accessor: Device address and endpoint control
- BUFF_
CPU_ SHOULD_ HANDLE - BUFF_CPU_SHOULD_HANDLE (r) register accessor: Which of the double buffers should be handled. Only valid if using an interrupt per buffer (i.e. not per 2 buffers). Not valid for host interrupt endpoint polling because they are only single buffered.
- BUFF_
STATUS - BUFF_STATUS (rw) register accessor: Buffer status register. A bit set here indicates that a buffer has completed on the endpoint (if the buffer interrupt is enabled). It is possible for 2 buffers to be completed, so clearing the buffer status bit may instantly re set it on the next clock cycle.
- EP_
ABORT - EP_ABORT (rw) register accessor: Device only: Can be set to ignore the buffer control register for this endpoint in case you would like to revoke a buffer. A NAK will be sent for every access to the endpoint until this bit is cleared. A corresponding bit in
EP_ABORT_DONE
is set when it is safe to modify the buffer control register. - EP_
ABORT_ DONE - EP_ABORT_DONE (rw) register accessor: Device only: Used in conjunction with
EP_ABORT
. Set once an endpoint is idle so the programmer knows it is safe to modify the buffer control register. - EP_
STALL_ ARM - EP_STALL_ARM (rw) register accessor: Device: this bit must be set in conjunction with the
STALL
bit in the buffer control register to send a STALL on EP0. The device controller clears these bits when a SETUP packet is received because the USB spec requires that a STALL condition is cleared when a SETUP packet is received. - EP_
STATUS_ STALL_ NAK - EP_STATUS_STALL_NAK (rw) register accessor: Device: bits are set when the
IRQ_ON_NAK
orIRQ_ON_STALL
bits are set. For EP0 this comes fromSIE_CTRL
. For all other endpoints it comes from the endpoint control register. - HOST_
ADDR_ ENDP - HOST_ADDR_ENDP (rw) register accessor: Interrupt endpoints. Only valid in HOST mode.
- INTE
- INTE (rw) register accessor: Interrupt Enable
- INTF
- INTF (rw) register accessor: Interrupt Force
- INTR
- INTR (r) register accessor: Raw Interrupts
- INTS
- INTS (r) register accessor: Interrupt status after masking & forcing
- INT_
EP_ CTRL - INT_EP_CTRL (rw) register accessor: interrupt endpoint control register
- MAIN_
CTRL - MAIN_CTRL (rw) register accessor: Main control register
- NAK_
POLL - NAK_POLL (rw) register accessor: Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK.
- SIE_
CTRL - SIE_CTRL (rw) register accessor: SIE control register
- SIE_
STATUS - SIE_STATUS (rw) register accessor: SIE status register
- SOF_RD
- SOF_RD (r) register accessor: Read the last SOF (Start of Frame) frame number seen. In device mode the last SOF received from the host. In host mode the last SOF sent by the host.
- SOF_WR
- SOF_WR (w) register accessor: Set the SOF (Start of Frame) frame number in the host controller. The SOF packet is sent every 1ms and the host will increment the frame number by 1 each time.
- USBPHY_
DIRECT - USBPHY_DIRECT (rw) register accessor: This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit.
- USBPHY_
DIRECT_ OVERRIDE - USBPHY_DIRECT_OVERRIDE (rw) register accessor: Override enable for each control in usbphy_direct
- USBPHY_
TRIM - USBPHY_TRIM (rw) register accessor: Used to adjust trim values of USB phy pull down resistors.
- USB_
MUXING - USB_MUXING (rw) register accessor: Where to connect the USB controller. Should be to_phy by default.
- USB_PWR
- USB_PWR (rw) register accessor: Overrides for the power signals in the event that the VBUS signals are not hooked up to GPIO. Set the value of the override and then the override enable to switch over to the override value.