Skip to main content

Module devcmdstat

Module devcmdstat 

Source
Expand description

USB Device Command/Status register

Structs§

DCON_C_R
Field DCON_C reader - Device status - connect change. The Connect Change bit is set when the device’s pull-up resistor is disconnected because VBus disappeared. The bit is reset by writing a one to it.
DCON_C_W
Field DCON_C writer - Device status - connect change. The Connect Change bit is set when the device’s pull-up resistor is disconnected because VBus disappeared. The bit is reset by writing a one to it.
DCON_R
Field DCON reader - Device status - connect. The connect bit must be set by SW to indicate that the device must signal a connect. The pull-up resistor on USB_DP will be enabled when this bit is set and the VBUSDEBOUNCED bit is one.
DCON_W
Field DCON writer - Device status - connect. The connect bit must be set by SW to indicate that the device must signal a connect. The pull-up resistor on USB_DP will be enabled when this bit is set and the VBUSDEBOUNCED bit is one.
DEVCMDSTAT_SPEC
USB Device Command/Status register
DEV_ADDR_R
Field DEV_ADDR reader - USB device address. After bus reset, the address is reset to 0x00. If the enable bit is set, the device will respond on packets for function address DEV_ADDR. When receiving a SetAddress Control Request from the USB host, software must program the new address before completing the status phase of the SetAddress Control Request.
DEV_ADDR_W
Field DEV_ADDR writer - USB device address. After bus reset, the address is reset to 0x00. If the enable bit is set, the device will respond on packets for function address DEV_ADDR. When receiving a SetAddress Control Request from the USB host, software must program the new address before completing the status phase of the SetAddress Control Request.
DEV_EN_R
Field DEV_EN reader - USB device enable. If this bit is set, the HW will start responding on packets for function address DEV_ADDR.
DEV_EN_W
Field DEV_EN writer - USB device enable. If this bit is set, the HW will start responding on packets for function address DEV_ADDR.
DRES_C_R
Field DRES_C reader - Device status - reset change. This bit is set when the device received a bus reset. On a bus reset the device will automatically go to the default state (unconfigured and responding to address 0). The bit is reset by writing a one to it.
DRES_C_W
Field DRES_C writer - Device status - reset change. This bit is set when the device received a bus reset. On a bus reset the device will automatically go to the default state (unconfigured and responding to address 0). The bit is reset by writing a one to it.
DSUS_C_R
Field DSUS_C reader - Device status - suspend change. The suspend change bit is set to 1 when the suspend bit toggles. The suspend bit can toggle because: - The device goes in the suspended state - The device is disconnected - The device receives resume signaling on its upstream port. The bit is reset by writing a one to it.
DSUS_C_W
Field DSUS_C writer - Device status - suspend change. The suspend change bit is set to 1 when the suspend bit toggles. The suspend bit can toggle because: - The device goes in the suspended state - The device is disconnected - The device receives resume signaling on its upstream port. The bit is reset by writing a one to it.
DSUS_R
Field DSUS reader - Device status - suspend. The suspend bit indicates the current suspend state. It is set to 1 when the device hasn’t seen any activity on its upstream port for more than 3 milliseconds. It is reset to 0 on any activity. When the device is suspended (Suspend bit DSUS = 1) and the software writes a 0 to it, the device will generate a remote wake-up. This will only happen when the device is connected (Connect bit = 1). When the device is not connected or not suspended, a writing a 0 has no effect. Writing a 1 never has an effect.
DSUS_W
Field DSUS writer - Device status - suspend. The suspend bit indicates the current suspend state. It is set to 1 when the device hasn’t seen any activity on its upstream port for more than 3 milliseconds. It is reset to 0 on any activity. When the device is suspended (Suspend bit DSUS = 1) and the software writes a 0 to it, the device will generate a remote wake-up. This will only happen when the device is connected (Connect bit = 1). When the device is not connected or not suspended, a writing a 0 has no effect. Writing a 1 never has an effect.
FORCE_NEEDCLK_R
Field FORCE_NEEDCLK reader - Forces the NEEDCLK output to always be on:
FORCE_NEEDCLK_W
Field FORCE_NEEDCLK writer - Forces the NEEDCLK output to always be on:
INTONNAK_AI_R
Field INTONNAK_AI reader - Interrupt on NAK for interrupt and bulk IN EP
INTONNAK_AI_W
Field INTONNAK_AI writer - Interrupt on NAK for interrupt and bulk IN EP
INTONNAK_AO_R
Field INTONNAK_AO reader - Interrupt on NAK for interrupt and bulk OUT EP
INTONNAK_AO_W
Field INTONNAK_AO writer - Interrupt on NAK for interrupt and bulk OUT EP
INTONNAK_CI_R
Field INTONNAK_CI reader - Interrupt on NAK for control IN EP
INTONNAK_CI_W
Field INTONNAK_CI writer - Interrupt on NAK for control IN EP
INTONNAK_CO_R
Field INTONNAK_CO reader - Interrupt on NAK for control OUT EP
INTONNAK_CO_W
Field INTONNAK_CO writer - Interrupt on NAK for control OUT EP
LPM_REWP_R
Field LPM_REWP reader - LPM Remote Wake-up Enabled by USB host. HW sets this bit to one when the bRemoteWake bit in the LPM extended token is set to 1. HW will reset this bit to 0 when it receives the host initiated LPM resume, when a remote wake-up is sent by the device or when a USB bus reset is received. Software can use this bit to check if the remote wake-up feature is enabled by the host for the LPM transaction.
LPM_SUP_R
Field LPM_SUP reader - LPM Supported:
LPM_SUP_W
Field LPM_SUP writer - LPM Supported:
LPM_SUS_R
Field LPM_SUS reader - Device status - LPM Suspend. This bit represents the current LPM suspend state. It is set to 1 by HW when the device has acknowledged the LPM request from the USB host and the Token Retry Time of 10 ms has elapsed. When the device is in the LPM suspended state (LPM suspend bit = 1) and the software writes a zero to this bit, the device will generate a remote walk-up. Software can only write a zero to this bit when the LPM_REWP bit is set to 1. HW resets this bit when it receives a host initiated resume. HW only updates the LPM_SUS bit when the LPM_SUPP bit is equal to one.
LPM_SUS_W
Field LPM_SUS writer - Device status - LPM Suspend. This bit represents the current LPM suspend state. It is set to 1 by HW when the device has acknowledged the LPM request from the USB host and the Token Retry Time of 10 ms has elapsed. When the device is in the LPM suspended state (LPM suspend bit = 1) and the software writes a zero to this bit, the device will generate a remote walk-up. Software can only write a zero to this bit when the LPM_REWP bit is set to 1. HW resets this bit when it receives a host initiated resume. HW only updates the LPM_SUS bit when the LPM_SUPP bit is equal to one.
R
Register DEVCMDSTAT reader
SETUP_R
Field SETUP reader - SETUP token received. If a SETUP token is received and acknowledged by the device, this bit is set. As long as this bit is set all received IN and OUT tokens will be NAKed by HW. SW must clear this bit by writing a one. If this bit is zero, HW will handle the tokens to the CTRL EP0 as indicated by the CTRL EP0 IN and OUT data information programmed by SW.
SETUP_W
Field SETUP writer - SETUP token received. If a SETUP token is received and acknowledged by the device, this bit is set. As long as this bit is set all received IN and OUT tokens will be NAKed by HW. SW must clear this bit by writing a one. If this bit is zero, HW will handle the tokens to the CTRL EP0 as indicated by the CTRL EP0 IN and OUT data information programmed by SW.
VBUSDEBOUNCED_R
Field VBUSDEBOUNCED reader - This bit indicates if Vbus is detected or not. The bit raises immediately when Vbus becomes high. It drops to zero if Vbus is low for at least 3 ms. If this bit is high and the DCon bit is set, the HW will enable the pull-up resistor to signal a connect.
W
Register DEVCMDSTAT writer

Enums§

FORCE_NEEDCLK_A
Forces the NEEDCLK output to always be on:
INTONNAK_AI_A
Interrupt on NAK for interrupt and bulk IN EP
INTONNAK_AO_A
Interrupt on NAK for interrupt and bulk OUT EP
INTONNAK_CI_A
Interrupt on NAK for control IN EP
INTONNAK_CO_A
Interrupt on NAK for control OUT EP
LPM_SUP_A
LPM Supported: