USB mass storage - device Eject - lockup

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

using 1.7, USB mass storage to PC / Mac and set up in device mode. When the PC user "ejects" the device, the device gets locked in a dead loop at:
file: device_mass_storage.c
function: static void usb_mass_storage_csw(void)
code;

while (Is_usb_endpoint_stall_requested(EP_MS_OUT))
{
if (Is_usb_setup_received()) usb_process_request();
}

The problem is that under this "Eject" situation, the function Is_usb_setup_received() returns false, but Is_usb_endpoint_stall_requested(EP_MS_OUT) is always true. Hence the infinite loop.

What do you suggest? What is the proper way to detect the Eject event, and handle it?

Thanks rossh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm never seen that. Try to use the latest ASF (v2.3.1) in AVR Studio 2.5, there is a new version of the USB device stack.

-sma