Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12475 Discussions

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

Honored Contributor II

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...
0 Kudos
2 Replies
Honored Contributor II

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.
Honored Contributor II

Sure Galfonz, I will try with various pen drives.  

I sincerely apologize for posting the same question.