This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB not getting Descriptor during Enumeration

Hi, I'm working on enumerating the 52840PDK as a CDC ACM device and I'm running into an issue where it's fully enumerating 80% of the time.

After doing some checking I've found that during the enumeration sequence, some times I'll get stuck in the SETUP token stage and keep receiving bRequest = 0000 0110 which corresponds to the GET_DESCRIPTOR routine. The way I have this handled in my code is setting the EPIN[0].PTR to the buffer containing the device descriptor and EPIN[0].MAXCNT to the OR'd value of WLENGTHL and WLENGTHH. I then start the TASKS_STARTEPIN[0] and wait for the EPDATADONE event in order to receive the next bRequest.

The next request should be a bRequest = 0000 1001 for SET_CONFIGURATION and whenever I receive this event it always goes through just fine, however sometimes I keep receiving the SETUP token and I'm not sure why.

As a side question, the last bRequest value I'm receiving is bRequest = 0010 0000 which doesn't correspond to any standard request that I can find. I've assumed that this is signaling the end of the enumeration process and treat it as such. The device is listed under /dev/ in Linux as a ttyACM and appears under lsusb so it's registered and enumerated.

Thank you.

Parents
  • What's the bmRequestType for that unknown bRequest? That will tell you what the destination is (class, device etc). It's not signalling the end of enumeration, it has a purpose. 

  • urg hit return too fast. My suspicion is that it's SET_LINE_CODING aimed at the CDC device. 

  • I just checked and you're correct, I was having a difficult time finding the corresponding code for this. Thank you, I'll keep going through the setup sequence, I'm still unsure about why it gets stuck in a SETUP cycle though.

Reply
  • I just checked and you're correct, I was having a difficult time finding the corresponding code for this. Thank you, I'll keep going through the setup sequence, I'm still unsure about why it gets stuck in a SETUP cycle though.

Children
No Data