This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB device - SCSI commands not work

I write simple test programm (host mode, full speed) to work with USB stick.
In the begining this program do:
- get descriptor form USB stick (with numbers of IN and OUT end-points in the device),
- set this number of IN, OUT endpoints in the USB controller,
- set Address 1,
- set Configuration 1,
- set Interface 0.
It's works correct.
Than program send CBW with any SCSI command (inquory/read10/write10) and recive ACK.
But when it send IN (or OUT for write10 command) request, than device answer STALL.
Where is my mistake?
For only one USB stick (A-Data 2 Gb) my programm work correct - I can read or write sector from/to USB stick (I don't undestand why!).

Alex.

Parents
  • Tsuneo, thanks for your answer.

    Yes, I used Clear_Feature( ENDPOINT_HALT ).
    Than if I do GET_STATUS for this end-point (0x81 for example), I receive 0 (i.e. all is OK!).
    This requests are sended from host end-point number 0 to device end-point number 0.

    But when I send IN request (for read CSW) I get STALL again.
    This request is sended from host end-point number 1 to device IN end-point number 1 (0x81).

Reply
  • Tsuneo, thanks for your answer.

    Yes, I used Clear_Feature( ENDPOINT_HALT ).
    Than if I do GET_STATUS for this end-point (0x81 for example), I receive 0 (i.e. all is OK!).
    This requests are sended from host end-point number 0 to device end-point number 0.

    But when I send IN request (for read CSW) I get STALL again.
    This request is sended from host end-point number 1 to device IN end-point number 1 (0x81).

Children
No data