| Electronic Components Datasheet Search |
|
SEC2410 Datasheet(PDF) 170 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
SEC2410 Datasheet(HTML) 170 Page - Microchip Technology |
|
170 / 283 page ![]() SEC2410/SEC4410 DS00001587C-page 170 2013 - 2014 Microchip Technology Inc. The following is an example of a configuration of EP0 and EP2 using Processor “C” code: CR_AHB unsignedchar volatile udc_csr_cntrl_at_ 0x40012C00;// UDC20 CSR bus config register CR_AHB unsignedlong volatile udc_csr_data_at_ 0x40012C04;// UDC20 CSR bus data CR_AHB unsignedshort volatile udc_csr_addr_at_ 0x40012C0E;// UDC20 CSR bus address #define SIE_EP0_RD_CSR_ADDR 0x0 #define SIE_EP0_WR_CSR_ADDR 0x4 #define SIE_EP1_RD_CSR_ADDR 0x8 #define SIE_EP1_WR_CSR_ADDR 0xC #define SIE_EP2_RD_CSR_ADDR 0x10 #define SIE_EP2_WR_CSR_ADDR 0x14 #define SIE_EP3_RD_CSR_ADDR 0x18 #define SIE_EP3_WR_CSR_ADDR 0x1C // Program the setup command address register udc_csr_data = 0x00000100;// setup command address register = 0x100 udc_csr_addr = 0x0;// select register 0 udc_csr_ cntrl = 0x1;// do a write // Program EP0, read and write are the same register for EP0 udc_csr_data = 0x02000000; // size = 64, alt =0, intf=0, conf=0, type= cntrl, ep= 0 udc_csr_addr = SIE_EP0_RD_CSR_ADDR; // select register address 4 udc_csr_ cntrl = 0x1;// do a write // Program EP2 udc_csr_data = 0x100000D2; // size = 512, alt =0, intf=0, conf=1, type= bulk, dir=in, ep= 2 udc_csr_addr = SIE_EP2_RD_CSR_ADDR; // select register address 0x10 udc_csr_ cntrl = 0x1;// do a write udc_csr_data = 0x100000C2; // size = 512, alt =0, intf=0, conf=1, type= bulk, dir=out, ep= 2 udc_csr_addr = SIE_EP2_WR_CSR_ADDR; // select register address 0x14 udc_csr_ cntrl = 0x1; // do a write 16.1.9 USB EVENTS There are several events, which cause different parts of the SIE to be initialized. The following is the list of events and the respective actions. 16.1.9.1 USB Bus Reset USB Bus Reset is recognized only when the clocks are running. If the device is in SUSPEND mode with the clocks stopped, a USB RESET will be first recognized as a RESUME event and if the WU_FM_SRC_1 bit for RESUME is unmasked, will restart the clocks. The USB RESET can only then be detected. Upon recognition it causes the following: 1. All SIE endpoint registers are set to their POR values, all stall conditions, the SETUP bit, are cleared. The PID sequencers, internal DTOG are reset for all endpoints 2. The following registers will be set to their POR values: SIE_SRC, USB_CONF, and endpoint control registers. 3. If the USB_RESET in USB_STAT is unmasked, then a ISR_0 interrupt (USB_STAT) is generated to the Proces- sor. 4. The following registers will be set to their POR values: ISR_0, Endpoint Control registers. Note 16-1 EP0 is always available once the device is powered and the USB Bus Reset has been received. 16.1.9.2 Suspend This is detected by the SIE when the idle condition on the USB bus occurs for a duration of more than 3ms. Upon detec- tion of this condition the SIE sets the SUSPEND interrupt bit of SIE_SRC. It shuts down the USB PHY, and shuts down the clocks coming to it. No firmware intervention is required to shut down the PHY. After getting the interrupt, the Pro- cessor can either do nothing, or shut the clocks off completely. This is done using the options in the CLOCK_CTL reg- ister. If the hardware detects a wake-up event while the Processor tries to shutdown the PLL, the PLL will be automatically restarted. If an attempt is made to disable the PLL while the UDC20 is connected to the USB bus, and it is not in suspend, the PLL will remain enabled. If the UDC20 is disconnect from the USB bus, the UDC20 block automatically goes to the suspend state. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |