Hi everyone,
I'm running the usb msd demo with a k20 chip to try and read a file from a USB drive. When I insert the drive, it is recognized as attached, and fat_demo() is called.
Near the start of fat_demo(), there are several disk_ioctl() calls. The section of code looks like this:
| /* Send some SCSI requests first */ |
disk_initialize(0);
#if !HIGH_SPEED_DEVICE
| res = disk_ioctl(0, UFI_INQUIRY_CMD, NULL); |
| res = disk_ioctl(0, UFI_INQUIRY_CMD, NULL); |
| res = disk_ioctl(0, REQUEST_SENSE_CMD, NULL); |
| //res = disk_ioctl(0, UFI_TEST_UNIT_READY_CMD, NULL); | /* On some devices UFI_TEST_UNIT_READY_CMD may fail*/ | |
| res = disk_ioctl(0, UFI_READ_FORMAT_CAPACITY_CMD, NULL); |
| res = disk_ioctl(0, UFI_READ_CAPACITY_CMD, NULL); |
As you can see there are several disk_ioctl calls. The code always hangs on the second one (res = disk_ioctl(0, UFI_INQUIRY_CMD, NULL);), and seems to be spinning in the _usb_khci_task() function.
Has anyone else had this problem? If I commend out that particular line, the code just hangs on the next one. It somehow makes it through the first disk_ioctl call though.
Thanks
Marlon