| Author | beginning argument ( Replies received: 7 ) |
| linus_van_pelt |
Posted 19-09-2007 at 08:48   |

Registered on : 08-29-2007
From Germany
Messages : 4
OFF-Line
|
Hello everyone,
i have some problems with the st library for str9. you offer an virtual comport example based on this library, but the example hangs in the usb_init function
exactly here:
UART0_Config_Default();
while (pInformation->Current_Configuration == 0) NOP_Process(); <-- here
bDeviceState = CONFIGURED;
i am using a str9-comstick with hitex gnu toolchain.
|
|
|
Profile
Quote
|
| cosmapa |
Posted 19-09-2007 at 10:54   |

Registered on : 02-07-2006
From Switzerland
Messages : 27
OFF-Line
|
I have the same problem with the Comstick. I tried it on a STR711 using the IAR tools and it hangs the same way. I found the joystick demo to work so I assume there is something wrong with the code in the USB library.
|
|
|
Profile
Quote
|
| linus_van_pelt |
Posted 19-09-2007 at 11:32   |

Registered on : 08-29-2007
From Germany
Messages : 4
OFF-Line
|
i saw a unknown device in the systemmanager, cosmapa could you install the driver ( stmcdc.inf )? because i couldn't install this driver "there are no informations about the device driver" or something like that.
i think the problem is that no reset is send to the device and so no virtual comport intialisation is started.
while (pInformation->Current_Configuration == 0) NOP_Process(); waiting for a initialisation and in the virtual comport reset:
void Virtual_Com_Port_Reset(void)
{
/* Set Virtual_Com_Port_DEVICE as not configured */
pInformation->Current_Configuration = 0;
...
}
and
void Virtual_Com_Port_init(void)
{
pInformation->Current_Configuration = 0;
/* Connect the device */
.....
while (pInformation->Current_Configuration == 0) NOP_Process();
bDeviceState = CONFIGURED;
}
but nowhere is Current_Configuration assigned an other value like 0.
kind regards
wolfgang
|
|
|
Profile
Quote
|
| cosmapa |
Posted 19-09-2007 at 11:43   |

Registered on : 02-07-2006
From Switzerland
Messages : 27
OFF-Line
|
I could not install the driver because this is something that Windows normally asks after the device is found. I am sure that if the demo was working, you would be prompted to install this driver.
In my case, when I plug the USB cable, the PC sees that there is a USB device attached, probably because of the pull up resitor that is on the USB data line, but could not engage in any dialog.
When running the working USB demo, I saw that the demo was also hanging at the same init point, but would resume after the USB cable is plugged to the PC (and I assume, device was found and initialised).
|
|
|
Profile
Quote
|
| linus_van_pelt |
Posted 19-09-2007 at 12:43   |

Registered on : 08-29-2007
From Germany
Messages : 4
OFF-Line
|
okay thanks,
so it seemed to be an error in the library?
|
|
|
Profile
Quote
|
| cosmapa |
Posted 24-09-2007 at 09:38   |

Registered on : 02-07-2006
From Switzerland
Messages : 27
OFF-Line
|
Problem is fixed. The hw_config.c file in the demo does not have the PLL configured for the 4MHz crystal that the IAR kit uses. The attached files have the correct values and it works.
|
|
|
Profile
Quote
|
| valentin.longchamp |
Posted 05-02-2008 at 19:07   |

Registered on : 02-05-2009
Messages : 3
OFF-Line
|
I am experiencing exactly the same problem, as you can read in this post:http://www.st.com/mcu/forums-cat-6323-12.html
In your last post, you mention attached files where the problem is fixed. How can I get them ? I do not see them attached to this thread.
However, I have checked, my IAR board does not use a 4MHz but a 8 MHz external crystal, as does the ST dev board. So this may be another problem ?
|
|
|
Profile
Quote
|
| emre.gunaydin |
Posted 01-12-2008 at 12:28   |

Registered on : 11-21-2009
Messages : 2
OFF-Line
|
Hi linus_van_pelt and cosmapa;
I have got the same problem about
(while (pInformation->Current_Configuration == 0) NOP_Process(); <-- here)
part.
Could you resolve your problem?
|
|
|
Profile
Quote
|