Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Not able to read device description of pen drive via USB interface.

Hello everyone!

I am trying to execute a C code in Nios IDE to create a file in pen drive connected to Micron Nand flash via USB.

After running the program, file system is succesfuly initialized, USB host stack is also created and initialized.

Then I connect the pen drive and the message :

"Device connected. Device speed is full speed (12 Mb/s)" will be displayed.

Later an error : "USBH_DevDescRd: 3119, err = -4" appears.

I think this means that the device description is not being read successfully. Why is this happening? how to eliminate this error?

please help, any advice is welcome...

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Some pen drives include additional devices (security, etc). Simplistic software like most embedded libraries can't deal with this. Sometimes USB hub(s) are also included. I'd suggest trying your code with a variety of different brands, models, sizes of pen drives and use the ones that work. That's easier than debugging a more complex pen drive. If your device needs to work with any generic pen drive, I'd suggest purchasing a commercial USB and file system stack for embedded devices rather than relying on code from a demo.

    Also, it's not considered polite to post the same question in multiple forum areas.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sure Galfonz, I will try with various pen drives.

    I sincerely apologize for posting the same question.