Stephane Caron

USB connection stuck in usb_host_start_transaction

Discussion created by Stephane Caron on Nov 28, 2008
Latest reply on Feb 16, 2011 by David Veerman

I use the CMX routines downloaded from Freescale Web Site, a MCF52211 and CodeWarrior 7.0. I have 2 important issues related to the usb_host_start_transaction() function:

1- There is a USB key that can not be read/write or initialized at all. It is a standard USB key (1GB) and it is working correctly on my PC (Windows XP);

2- During a transfer (read or write), when I remove a USB key, any key, the action is well supported most of the time, but some time not (1/20 with some keys, problematic each time for few keys);

 

The common thing with these 2 problems is that the ColdFire is waiting infinitely in the following loop of usb_host_start_transaction() :

while((MCF_USB_INT_STAT & (MCF_USB_INT_STAT_TOK_DNE | MCF_USB_INT_STAT_STALL | MCF_USB_INT_STAT_ERROR)) ==0)

{

   if (MCF_USB_INT_STAT & MCF_USB_INT_STAT_USB_RST)

   {

        evt_disconnect();

        tr_error=tre_disconnected;

        return((hcc_u16)-1u);

   }

}

 

I tried to resolve the problem by checking the following post:

http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=4944&query.id=100893#M4944

and

http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=5182&query.id=100901#M5182

but without success.

 

Note: for point #1, I also tried the same USB key on a M52210DEMO board with original Freescale code on it to make sure it was not specific to my software project, but the same problem happen. It freezes after "Mass-storage driver started”.

 

Did someone got that problem too and overcome it?
 
Frelon

Outcomes