Problem with enumeration process when configuring USB as a host

Status
Not open for further replies.

sumit_coinel

Newbie level 3
Joined
Jul 17, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
bangalore
Activity points
1,302
hello friends

i am working at USB. i am working on LPC1768 ARM controller. i am using usb as a host . but while configuring it as a host i am facing problem during enumeration process....
like..

void Host_Init (void)
{


LPC_USB->OTGStCtrl = 0x3; //OTGStctrl register

/*P1[18] = USB_UP_LED, 01 */
/* P1[19] = /USB_PPWR, 10 */
/* P1[22] = USB_PWRD, 10 */
/* P1[27] = /USB_OVRCR, 10 */
LPC_PINCON->PINSEL3 &= ~((3<<4) | (3<<6) | (3<<12) | (3<<22));
LPC_PINCON->PINSEL3 |= ((1<<4)|(2<<6) | (2<<12) | (2<<22)); // 0x00802080

/* P0[29] = USB_D+, 01 */
/* P0[30] = USB_D-, 01 */
LPC_PINCON->PINSEL1 &= ~((3<<26) | (3<<28));
LPC_PINCON->PINSEL1 |= ((1<<26)|(1<<28)); // 0x14000000

PRINT_Log("Initializing Host Stack\n");

// For chip revision V01 and later
HostBaseAddr = HOST_BASE_ADDR;

Hcca = (volatile HCCA *)(HostBaseAddr+0x000);
TDHead = (volatile HCTD *)(HostBaseAddr+0x100);
TDTail = (volatile HCTD *)(HostBaseAddr+0x110);
EDCtrl = (volatile HCED *)(HostBaseAddr+0x120);
EDBulkIn = (volatile HCED *)(HostBaseAddr+0x130);
EDBulkOut = (volatile HCED *)(HostBaseAddr+0x140);
TDBuffer = (volatile uint8_t *)(HostBaseAddr+0x150);
FATBuffer = (volatile uint8_t *)(HostBaseAddr+0x1D0);
UserBuffer = (volatile uint8_t *)(HostBaseAddr+0x1000);
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…