USBFS continually disconnecting/reconnecting?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I'm trying to get a very basic USB implementation up and running. I intend on just doing some basic vendor-specific transfers but at the moment I can't seem to get the USB device to enumerate for more than a few fractions of a second.

   

 

   

My main loop is very straightforward:

   

 

   
int main(void) {  int i;   CyGlobalIntEnable;  USB_Start(0, USB_DWR_VDDD_OPERATION);   i = 0;  while (! USB_GetConfiguration()) {   Port2Reg_Write(1 << i);   wait100();    i++;   if (i == 😎 {    i = 0;   }  }  Port2Reg_Write(0);  /* ... */ }
   

 

   

Right now, USB_GetConfiguration() never returns nonzero so I sit and spin. The computer (OSX, also tried on Windows and Linux) shows the USB device enumerating and then disappearing, over and over again. If I am quick enough I can see that my manufacturer name and product name strings show up in lsusb output but that's it.

   

 

   

Is there something basic I'm missing? I have studied the examples and they seem to do the same thing, and in fact if I load one of the other PSoC5LP demos (such as the PSoC 4 Pioneer programmer source) it does the same thing, leading me to believe that something isn't correct perhaps on my board.

0 Likes
13 Replies