This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x USB1 DRVVBUS in host mode

Other Parts Discussed in Thread: AM3359

I have been struggle with this issue about a week.

In my Am335x EVM board, I want to use the USB1 as host. As the Am335x TRM says: the USB host controller assuming the host role by either detecting the grounded ID pin or by the setting the USB1MODE register.

The USB1 ID pin is connected to the ground from the schematic, so by default the USB1 controller should assuming host role there for drives the USB1_DRVVBUS pin high. but it doesn't work in my case.

the following is my USB1 pin configurations and setup

    // enable clock
    CM_PER_USB0_CLKCTRL = 0x2;

/*DM pin config*/ CONF_USB1_DM_bit.SLEWCTRL = 0; CONF_USB1_DM_bit.PUDEN = 0; CONF_USB1_DM_bit.PUTYPESEL = 0; CONF_USB1_DM_bit.MMODE = 0;
/*DP pin config*/ CONF_USB1_DP_bit.SLEWCTRL = 0; CONF_USB1_DP_bit.PUDEN = 0; CONF_USB1_DP_bit.PUTYPESEL = 0; CONF_USB1_DP_bit.MMODE = 0;
/*CE pin config: PHY charge enable, for detecting charge attached*/ CONF_USB1_CE_bit.SLEWCTRL = 0; CONF_USB1_CE_bit.PUDEN = 1; CONF_USB1_CE_bit.PUTYPESEL = 0; CONF_USB1_CE_bit.MMODE = 1;
/*ID pin config*/ CONF_USB1_ID_bit.SLEWCTRL = 0; CONF_USB1_ID_bit.PUDEN = 0; CONF_USB1_ID_bit.PUTYPESEL = 0; CONF_USB1_ID_bit.MMODE = 0;
/*VBUS pin config, disable pullup/pulldown*/ CONF_USB1_VBUS_bit.SLEWCTRL = 0; CONF_USB1_VBUS_bit.PUDEN = 1; CONF_USB1_VBUS_bit.MMODE = 0;
/*DRVVBUS pin config, disable pullup/pulldown*/ CONF_USB1_DRVVBUS_bit.SLEWCTRL = 0; CONF_USB1_DRVVBUS_bit.PUDEN = 1; CONF_USB1_DRVVBUS_bit.MMODE = 0;
/*CM PHY, 0: PHY in normal mode, 1: PHY powered down*/ USB_CTRL1_bit.CM_PWRDN = 0;
/*OTG PHY, 0: PHY in normal mode, 1: PHY powered down*/ USB_CTRL1_bit.OTG_PWRDN = 0;
/*0: USB mode, 1: GPIO*/ USB_CTRL1_bit.GPIOMODE = 0;

/* Reset the USB controller */ USB1CTRL_bit.SOFT_RESET = 1; /* Wait until controller is finished with Reset. When done, it will clear the RESET bit field. */ while (USB1CTRL_bit.SOFT_RESET) { } /*Interrupt enable: 1 manually set, 0 automatically set*/ USB1CTRL_bit.UINT = 1; /*Interrupt enable for Mentor controller USB_INT generic interrupt*/ USB1IRQENABLECLR1_bit.USB_9 = 1; /*Interrupt enable for Mentor controller USB_INT generic interrupt*/ USB1IRQENABLESET1_bit.USB_9 = 1;

 

The above code works in AM335x starter Kit, I can see the DRVVBUS goes high once the USB1 controller in section, but it doesn't work in AM335x EVM board.

I also tried force the USB host mode by setting the registers:

USB1MODE_bit.IDDIG_MUX = 1; 
USB1MODE_bit.IDDIG = 0;


but it doesn't make difference. what do I miss? please help!

- Xiaoyi