EmbeddedRelated.com
Forums
Memfault Beyond the Launch

usb problem in a embedded system

Started by mavaec June 12, 2007
Hi,

I'm developing an embedded system which can work as an USB host. It is
based on the PIC18F6622 mcu, and the MAX3421E USB driver.
While working as USB host, the system should communicate to any flash
memory stick. 
At the moment, I've tried 4 different memory sticks, and just 2 of them
work fine, so it is possible to read/write files from/to them (all 4
devices work fine when plugged to a PC).
The 2 devices that do not work report to the SCSI command
"test_unit_ready" with 0x01, that is, they are not ready.
I don't know how to make them be ready. I've tried to reset them, but they
always report the same.
Any suggestion?

Thanks

 



On Jun 12, 7:49 am, "mavaec" <mav...@gmail.com> wrote:

> The 2 devices that do not work report to the SCSI command > "test_unit_ready" with 0x01, that is, they are not ready.
It is a matter of breathtaking complexity to support "standard" products from different vendors. The best advice one can give is to observe exactly what happens when you plug those sticks into a Windows host, and emulate what you see there. Are these perhaps password-protected?
On 12 Jun, 13:17, larwe <zwsdot...@gmail.com> wrote:
> On Jun 12, 7:49 am, "mavaec" <mav...@gmail.com> wrote: > > > The 2 devices that do not work report to the SCSI command > > "test_unit_ready" with 0x01, that is, they are not ready. > > It is a matter of breathtaking complexity to support "standard" > products from different vendors. The best advice one can give is to > observe exactly what happens when you plug those sticks into a Windows > host, and emulate what you see there. > > Are these perhaps password-protected?
I dont think they are password protected as in XP you dont need a OEM driver for it, they just work under the XP operating system.
> I'm developing an embedded system which can work as an USB host. It is > based on the PIC18F6622 mcu, and the MAX3421E USB driver. > While working as USB host, the system should communicate to any flash > memory stick. > At the moment, I've tried 4 different memory sticks, and just 2 of them > work fine, so it is possible to read/write files from/to them (all 4 > devices work fine when plugged to a PC). > The 2 devices that do not work report to the SCSI command > "test_unit_ready" with 0x01, that is, they are not ready.
Do you mean that the returned CSW contains 0x01 ("Command failure")? If so, you need to read the sense (REQUEST_SENSE) from the stick to find out what it is objecting to. This will give you the sense code as well as the additional sense codes. Have you checked what class/subclass/protocol the sticks are returning - are they all the same? Andrew

Memfault Beyond the Launch