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 :-]
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 heart
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() :-[
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.