USB state blocks on "Wait SOF"

Hello,

I try to make working a Sparkfun USB Shield with an Arduino Mega. I have modified "USB_desc" sample sketch in order to show the current USB state with time in milliseconds (following http://www.circuitsathome.com/). I can see state changing from "Reset device" to "Wait SOF", but after nothing hapens. I have tried different USB devices connected to the USB host shield, but the behavior is always the same.

This is what is displayed :

Start
202 - 0x20: Settle
403 - 0x30: Reset device
404 - 0x40: Wait reset complete
405 - 0x50: Wait SOF

Thanks for suggestions.

Stéphane.

Hello,

I eventually have my joystick working !
The problem was that the MAX3421e was never set to "host" state. I modified Usb.cpp, line 465 :

        case USB_ATTACHED_SUBSTATE_SETTLE:              //setlle time for just attached device
            if( delay < millis() ) {
                // Host mode
                tmpdata = regRd(rMODE) |= 0x01;
                regWr( rMODE, tmpdata );
                
                usb_task_state = USB_ATTACHED_SUBSTATE_RESET_DEVICE;
                }
            break;

Regards.