AnsweredAssumed Answered

USB Mass Storage Demo Problems

Question asked by The Boat on Sep 20, 2011
Latest reply on Jun 16, 2012 by Clive One

I am working with the STM3210C-EVAL Board and the demos provided with the STM32F105/7 and STM32F2xx USB on-the-go Host and device library.

The libraries provided for initializing the USB on the device take a structure that is a set of callbacks that the user creates for the various usb events.  In the demo, they are all contained in the files usbd_usr.h and usbd_usr.c.  

These files almost exclusively deal with the LEDs and the LCD screen for the demo.  I am working on taking the demo from one board to another that doesn't have an LCD screen.  As I understand the goal and function of these files, none of the core USB functionality should be affected by modifications to this file.

When I take out the LCD initialization (as well as all calls to the LCD that would depend on this initialization) my demo never successfully connects to the host PC.  It will show up as a device, but it is not possible to read or write anything to the device.  

Pausing the debugger does not indicate that any fault is occuring.  

Further, I have a USB protocol analyzer and an inspection of the packets sent back and forth reveal that the USB device will read the first sector of data, and then fail when subsequent sectors are attempted to be read from the USB device.  

I've checked, and the SPI lines that goes to the memory card appear to behave appropriately on a scope.  Also, the first sector that returns is the same first sector byte for byte as when the demo functions with the LCD portion of the code in it.

Unless I am way off, I assumed the usbd_usr functions could all be replaced with empty functions, and nothing should be affected as far as the core functionality goes.    

Anybody have any thoughts about what might be going on here?