Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
609
/
631
Table 26-4 Resume event detection
[USB_FN.RXDP_STS, USB_FN.RXDM_STS]
Wake-up event
Software operation
00
Root reset
None
01
Root resume
None
10
None (noise on bus)
Go back in Suspend mode
11
Not allowed (noise on bus)
Go back in Suspend mode
Note:
1
、
The USB_CTRL.RESUM bit can only be set when USB_CTRL.FSUSPD = 1, i.e. the USB module is in suspend
state.
USB interrupt
The USB controller has 3 interrupt lines, which are as follows:
USB low priority interrupt (channel 21): can be triggered by all USB events;
USB high-priority interrupt (channel 20): can only be triggered by correct transfer events for isochronous and
double-buffered bulk transfers;
USB resume interrupt (channel 42): triggered by a resume event from USB suspend mode.
Endpoint initialization
1.
Initialize the USB_ADDRn_TX or USB_ADDRn_RX register, configure the endpoint Tx or Rx packet buffer
start address;
2.
According to the actual usage scenario of the endpoint, configure the USB_EPn.EP_TYPE bit and the
USB_EPn.EP_KIND bit to set the endpoint type and buffer type;
3.
Perform different operations based on the endpoint direction:
If it is a sending endpoint
1)
Set the USB_EPn.STS_TX bit to enable the sending function of the endpoint
2)
Configure the USB_CNTn_TX.CNTn_TX bit, set the endpoint data packet send buffer size
If it is a receiving endpoint
1)
Set the USB_EPn.STS_RX bit to enable the receiving function of the endpoint
2)
Configure the USB_CNTn_RX.BL_SIZE bit and the USB_CNTn_RX.NUM_BLK bit to set the endpoint
packet receive buffer size
USB registers
The peripheral registers can be accessed by half-words (16-bit) or words (32-bit).
USB base address: 0x4000 5C00