| Author | beginning argument ( Replies received: 4 ) |
| s_bhujbal |
Posted 20-03-2008 at 07:59   |

Registered on : 03-20-2008
Messages : 11
OFF-Line
|
I downloaded the Mass Storage Demo from st site, successfully compiled with RIDE & GNU toolchain. Downloaded it in STR711F. After starting it hangs in USB_Init().
I debug it further & found it doesn’t come out of while loop “while (pInformation->Current_Configuration == 0)” which is written in
function “MASS_Init()”. It is not going further that. After that we searched the locations where that variable is updated.
I found many peoples in forum having same problem but I didn't found the solution.
Can anybody kindly help me in its solution ?
|
|
|
Profile
Quote
|
| rm1 |
Posted 20-03-2008 at 20:58   |

Registered on : 01-29-2008
Messages : 3
OFF-Line
|
I had the same problem at the COM port demo.
It only works when at the start of the application a USB host is connected.
Only a short time also may pass between the start and the initialization. Otherwise the host reports a faulty device.
The problem is the initialization of the output "USB disconect". The output must be immediately activate (set to high) at the initialization.
It's then possible to initialize the USB later in the program. For example after inquiry of the input "USB present".
|
|
|
Profile
Quote
|
| s_bhujbal |
Posted 21-03-2008 at 06:22   |

Registered on : 03-20-2008
Messages : 11
OFF-Line
|
Dear rm1,
I will be very thankful to You if You explain me in detail I mean what to do exactly in code.
|
|
|
Profile
Quote
|
| rm1 |
Posted 21-03-2008 at 11:20   |

Registered on : 01-29-2008
Messages : 3
OFF-Line
|
I must say first that I work with the STM32 103.
At the initialization of the port with the output USB-DESELECT he must set to high.
With the FWLibrary. PC06 ist USB_DESELECT (in my application)
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
GPIO_Init(GPIOC, &GPIO_InitStructure);
GPIOC->BSRR = GPIO_Pin_6;
But I still have the problem, that it works sometimes and sometimes not.
It seems to be a timing problem. Only if at the start a USB host is connected, it works faultlessly.
I think, also being missing a time out in the function
Virtual_Com_Port_init in which the inquiry while (pInformation->Current_Configuration == 0) is.
I hope AnisAS can help us.
|
|
|
Profile
Quote
|
| s_bhujbal |
Posted 24-03-2008 at 10:41   |

Registered on : 03-20-2008
Messages : 11
OFF-Line
|
Dear rm 1 & all,
Mass Storage Problem is solved.
It was because USB clock was not setting. I just uncommented 2 lines in function Set_USBClock() which is called from main. I think those lines was commented for some specific reason.
I really thanks to all in this forum. I got clue through this forum only.
|
|
|
Profile
Quote
|