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.

EHCI stuck in idle after power up.

Other Parts Discussed in Thread: SYSCONFIG

I am having an intermittent problem with the high speed USB host startup on the 3530. I am using BSP 6.14.2 slightly modified for my custom board. I am getting occasional data abort exceptions when I first access the UHH SYSCONFIG register when I attempt to soft reset the module as part of the driver loading process. By intermittent I mean sometimes the exact same code works and sometimes it throws the exception.

I dumped several registers just before I access the UHH SYSCONFG and I can clearly see the differences seems to be the module still seems to be in idle.

Here is a good dump:

CM_FCLKEN_USBHOST (0xd0365400) 0x3

CM_ICLKEN_USBHOST (0xd0365410) 0x1

CM_IDLEST_USBHOST (0xd0365420) 0x1

CM_AUTOIDLE_USBHOST (0xd0365430) 0x1

CM_SLEEPDEP_USBHOST (0xd0365444) 0x2

CM_CLKSTCTRL_USBHOST (0xd0365448) 0x3

CM_CLKSTST_USBHOST (0xd036544c) 0x0

RM_RSTST_USBHOST (0xd0667458) 0x4

PM_WKEN_USBHOST (0xd06674a0) 0x1

PM_MPUGRPSEL_USBHOST (0xd06674a4) 0x1

PM_IVA2GRPSEL_USBHOST (0xd06674a8) 0x1

PM_WKST_USBHOST (0xd06674b0) 0x0

PM_WKDEP_USBHOST (0xd06674c8) 0x2

PM_PWSTCTRL_USBHOST (0xd06674e0) 0x30114

PM_PWSTST_USBHOST (0xd06674e4) 0x3

PM_PREPWSTST_USBHOST (0xd06674e8) 0x0

CM_CLKEN_PLL (0xd0364d00) 0x7f007f

CM_CLKEN2_PLL (0xd0364d04) 0x7f

CM_IDLEST_CKGEN (0xd0364d20) 0xa0f

CM_IDLEST2_CKGEN (0xd0364d24) 0xb

CM_AUTOIDLE_PLL (0xd0364d30) 0x9

CM_AUTOIDLE2_PLL (0xd0364d34) 0x1

CM_CLKSEL1_PLL (0xd0364d40) 0x8a60c00

CM_CLKSEL2_PLL (0xd0364d44) 0xd80c

CM_CLKSEL3_PLL (0xd0364d48) 0x9

CM_CLKSEL4_PLL (0xd0364d4c) 0x3c0c

CM_CLKSEL5_PLL (0xd0364d50) 0x1

CM_CLKOUT_CTRL (0xd0364d70) 0x81

UHH SYSCONFIG (0xd03c4010) 0x1

UHH SYSSTATUS (0xd03c4014) 0x7

UHH HOSTCONFIG (0xd03c4040) 0x700

 

And a bad dump:

CM_FCLKEN_USBHOST (0xd0365400) 0x3

CM_ICLKEN_USBHOST (0xd0365410) 0x1

CM_IDLEST_USBHOST (0xd0365420) 0x3

CM_AUTOIDLE_USBHOST (0xd0365430) 0x1

CM_SLEEPDEP_USBHOST (0xd0365444) 0x2

CM_CLKSTCTRL_USBHOST (0xd0365448) 0x3

CM_CLKSTST_USBHOST (0xd036544c) 0x0

RM_RSTST_USBHOST (0xd0667458) 0x0

PM_WKEN_USBHOST (0xd06674a0) 0x1

PM_MPUGRPSEL_USBHOST (0xd06674a4) 0x1

PM_IVA2GRPSEL_USBHOST (0xd06674a8) 0x1

PM_WKST_USBHOST (0xd06674b0) 0x0

PM_WKDEP_USBHOST (0xd06674c8) 0x2

PM_PWSTCTRL_USBHOST (0xd06674e0) 0x30114

PM_PWSTST_USBHOST (0xd06674e4) 0x100000

PM_PREPWSTST_USBHOST (0xd06674e8) 0x0

CM_CLKEN_PLL (0xd0364d00) 0x7f007f

CM_CLKEN2_PLL (0xd0364d04) 0x7f

CM_IDLEST_CKGEN (0xd0364d20) 0xa0f

CM_IDLEST2_CKGEN (0xd0364d24) 0x9

CM_AUTOIDLE_PLL (0xd0364d30) 0x9

CM_AUTOIDLE2_PLL (0xd0364d34) 0x1

CM_CLKSEL1_PLL (0xd0364d40) 0x8a60c00

CM_CLKSEL2_PLL (0xd0364d44) 0xd80c

CM_CLKSEL3_PLL (0xd0364d48) 0x9

CM_CLKSEL4_PLL (0xd0364d4c) 0x3c0c

CM_CLKSEL5_PLL (0xd0364d50) 0x1

CM_CLKOUT_CTRL (0xd0364d70) 0x81

Exception 'Data Abort' (4): Thread-Id=00a50002(pth=83879120), Proc-Id=00400002(p

prc=84ea1308) 'NK.EXE', VM-active=00880006(pprc=8372009c) 'udevice.exe'

PC=c0bd3b70(ehcihcd.dll+0x00003b70) RA=c0bd3b68(ehcihcd.dll+0x00003b68) SP=d02ae

988, BVA=00000000

Exception 'Raised Exception' (-1): Thread-Id=00a50002(pth=83879120), Proc-Id=004

00002(pprc=84ea1308) 'NK.EXE', VM-active=00880006(pprc=8372009c) 'udevice.exe'

PC=c003baf0(k.coredll.dll+0x0001baf0) RA=8393c520(kernel.dll+0x00006520) SP=d02a

e224, BVA=ffffffff

 

It seems to me the clock setup is ok but the module is not waking up or something (right from power up).

Is there a way to force a wake up? Or is something else wrong?

Has anyone else seen this problem?

 

 

  • You can use PM_PWSTCTRL_USBHOST and CM_CLKSTCTRL_USBHOST registers to force a wakeup.

  • Probably not the right way to wake it up.

    Anyway, it seems the reasion the UHH access was throwing the exception as because the USB port2 clock are not enabled.

    do this solved problem:

    pPddObject->dwUSBClock = OMAP_DEVICE_USBHOST2;

    // enable USBHOST clocks

    if (!DeviceIoControl(pPddObject->hRootBus, IOCTL_BUS_REQUEST_CLOCK, &pPddObject->dwUSBClock, sizeof(pPddObject->dwUSBClock), NULL, 0, NULL, NULL))

    {

    DEBUGMSG(ZONE_ERROR, (L"EHCI: IOCTL_BUS_REQUEST_CLOCK failed\r\n"));

    goto cleanUp;

    }

     

    Why the clock is disabled sometimes and not other times I'll never know.

     

     

  • Hi DavidVescovi,

    We use WinCE BSP version 6.1x and platform is AM3715.

    We have EHCI/OHCI data abort issue when resuming, this issue is similar yours.

    We don't know you how to fix this issue.

    Would you kindly tell us the detail solution for this issue?

    I dump the registers setting of the PRCM list below.

    The PRCM setting without error when resuming:

    RM_RSTST_USBHOST = 4
    PM_WKEN_USBHOST = 1
    PM_MPUGRPSEL_USBHOST = 1
    PM_IVA2GRPSEL_USBHOST = 1
    PM_WKST_USBHOST = 0
    PM_WKDEP_USBHOST = 2
    PM_PWSTCTRL_USBHOST = 30105
    PM_PWSTST_USBHOST = 3
    PM_PREPWSTST_USBHOST = 1
    CM_FCLKEN_USBHOST = 3
    CM_ICLKEN_USBHOST = 1
    CM_IDLEST_USBHOST = 0
    CM_AUTOIDLE_USBHOST = 1
    CM_SLEEPDEP_USBHOST = 2
    CM_CLKSTCTRL_USBHOST = 3

    CM_CLKSTST_USBHOST = 1

    The PRCM setting with data abort when resuming:

    RM_RSTST_USBHOST = 4
    PM_WKEN_USBHOST = 1
    PM_MPUGRPSEL_USBHOST = 1
    PM_IVA2GRPSEL_USBHOST = 1
    PM_WKST_USBHOST = 0
    PM_WKDEP_USBHOST = 2
    PM_PWSTCTRL_USBHOST = 30105
    PM_PWSTST_USBHOST = 100003
    PM_PREPWSTST_USBHOST = 0
    CM_FCLKEN_USBHOST = 3
    CM_ICLKEN_USBHOST = 1
    CM_IDLEST_USBHOST = 3
    CM_AUTOIDLE_USBHOST = 1
    CM_SLEEPDEP_USBHOST = 2
    CM_CLKSTCTRL_USBHOST = 3
    CM_CLKSTST_USBHOST = 0

    It seems the data abort is caused by accessing the USB host registers when USB HOST domain still in idle state.