[USB function driver related] Mass storage of WinCE6.0 related question

[USB function driver related] Mass storage of WinCE6.0 related question

Post by shjku » Wed, 02 Jul 2008 17:08:37

I got a question about Mass storage of WinCE6.0.
So, I have written about this.
If you know the answer or good idea, please let me know about that.
Thanx in advance!!

I failed to execute mass storage with USB function driver at WinCE6.0.
But, with WinCE5.0 I could execute mass storage well.

After analysis the cause of the problem, I found something wrong in
the MDD soruce code, especially bot.cpp,for USB.

As you can see in the below function code I pasted,
there is only one stall code for IN Endpoint.
(I marked with <== *)

But, at WinCE5.0 code there are two stall code for both of IN EP and

So, I added stall code for OUT EP at that line, then I confirmed that
mass storage worked well at WinCE6.0.

* Question:
Why the stall code for OUT EP has been removed at that line?
And I want to know how I can overcome this situation without
modifying bot.cpp file.
Please let me know where is the best place I have to put additional
code to prevent this problem at PDD source file.
And what kind of code I have to put in that place..

(In case that I didn't add additional code at that line, 0x2 request
through EP0 has not come.
And as a result USB driver is going to reset state.)


.. code abbreviation..

else {
// If the command is not supported, then return a
phase error
DEBUGMSG(ZONE_WARNING, (_T("%s command not supported\r

// Prepare for CSW transfer
g_dwCSWDataResidue = 0;

g_pUfnFuncs->lpStallPipe(g_hDevice, g_hBIPipe);
<== *



..code abbreviation..