2008-01-21 06:27 PM
2007-07-19 09:27 PM
I seem to be having and issue with the Device struct not being populated
and getting stuck in a NOP condition. I am currently using USB Mass Storage Device program of the USB dev Kit (UM0290) When the USB cable is plugged in Windows does not recognize the device and does not recognoze the device driver provided for windows. I really could use some advice on where to go forward. I am currently compiling under the Green Hills enviroment with the a Hitex Board with a STR710 chip here is the snipet of code void MASS_init() { pInformation->Current_Configuration = 0; /* Connect the device */ PowerOn(); /* USB interrupts initialization */ _SetISTR(0); /* clear pending interrupts */ wInterrupt_Mask = IMR_MSK; _SetCNTR(wInterrupt_Mask); /* set interrupts mask */ pInformation->Current_Feature = MASS_ConfigDescriptor[7]; /* Wait until device is configured */ while (pInformation->Current_Configuration == 0) NOP_Process(); bDeviceState = CONFIGURED; } Thanks :-]2007-07-20 02:54 AM
Hi suixingzhu;
I think your problem is due to the clock configuration... the USB developer kit is done on ST Eval board (16MHz main clock and 48MHz for the USB)... you should change the clock configuration according to your hardware (the clock configuration is done in the file hw_config.c) :) Regards The Lion heart2007-07-20 06:27 AM
First thank you for your help
But my board also has 16MHz main clock and 48MHz for the USB,I use the Mass Storage sample and do not change the clock configuration.It also gets stuck int the No_Process() :-[2007-07-22 09:02 PM
Ouuuups:-? !!!!!! Ok could you send me the schematic of your board?
Regards The Lion heart2007-07-23 07:04 PM
Thank you for your help
I have solved the problem :D2008-01-18 11:23 PM
WHAT WAS THE PROBLEM ? AND HOW WAS IT SOLVED ?
THANK YOU2008-01-21 07:36 AM
I have found that when debugging on a STR711 I need to step over the USB initialization code. I run to just before the USB initialization, step over the USB initialization, then run again. If I let the debugger run into the USB initialization that NOP_Process() loop never successfully sets the configuration variable.
This happens in both the IAR EWARM and the Anglia IDEaliST debuggers. J.R.2008-01-21 06:27 PM
I tried but even if I step over USB_Init function the program hang on NOP_Process()and the driver on PC doesn't recognize the hardware.
I need to use USB as a virtual com port. Will someone help me to get over this problem? Thank You