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

ARM7: LPC2148 & USB communication

I want to develop mass storage device using LPC2148.I am just referring code from Keil for USBMem. My problem is -
I get Get_descriptor command from PC to which I respond with device descriptor. On receiving 8th byte it generates Reset.
Then I get Set_address command. On response to it, I execute Set Address command in protocol engine.
Then again I get Get_descriptor command (It should actually have index field of 18 but I receive with 64).
Again after 8th byte it generates Reset and again gives Set_address command instead of Get_descriptor command for Configuration descriptor.
What can be the problem?

Parents
  • This is bus hound file

    Bus Hound 6.01 capture on Windows XP Service Pack 2 (x86). Complements of http://www.perisoft.net
    
    bulkoutint
    
      Device - Device ID (followed by the endpoint for USB devices)
                (28) USB Mass Storage Device
      Phase  - Phase Type
                CTL   USB control transfer       RESET bus reset
                IN    Data in transfer           USTS  USB status
                NTSTS NTSTATUS value             ok    command complete
                OUT   Data out transfer
      Data   - Hex dump of the data transferred
      Descr  - Description of the phase
      Delta  - Elapsed time from the previous phase to the current phase
      Cmd... - Position in the captured data
    
    
    Device  Phase  Data                                                Description       Delta  Cmd.Phase.Ofs(rep)
    ------  -----  --------------------------------------------------  ----------------  -----  ------------------
      28.0  CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR     26sc         1.1.0
      28.0  IN     12 01 00 02  00 00 00 40                            .......@          3.6ms         1.2.0
      28.0  CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR     36us         2.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         2.2.0
      28.0  CTL    80 06 00 02  00 00 20 00                            GET DESCRIPTOR     32us         3.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         3.2.0
      28.0  CTL    80 06 00 03  00 00 02 00                            GET DESCRIPTOR     28us         4.1.0
      28.0  IN     04 03                                               ..                3.9ms         4.2.0
      28.0  CTL    80 06 00 03  00 00 04 00                            GET DESCRIPTOR     28us         5.1.0
      28.0  IN     04 03 09 04                                         ....              3.9ms         5.2.0
      28.0  CTL    80 06 0c 03  09 04 02 00                            GET DESCRIPTOR     25us         6.1.0
      28.0  IN     1a 03                                               ..                3.9ms         6.2.0
      28.0  CTL    80 06 0c 03  09 04 1a 00                            GET DESCRIPTOR     27us         7.1.0
      28.0  IN     1a 03 41 00  42 00 43 00                            ..A.B.C.          3.9ms         7.2.0
      28.0  CTL    00 09 01 00  00 00 00 00                            SET CONFIG         34us         8.1.0
      28.0  CTL    01 0b 00 00  00 00 00 00                            SET INTERFACE      38ms         9.1.0
      28.0  CTL    a1 fe 00 00  00 00 01 00                            GET MAX LUN        39ms        10.1.0(3)
      28.0  USTS   c0000004                                            stall pid         4.3ms        10.2.0
      28.0  CTL    02 01 00 00  00 00 00 00                            CLEAR FEATURE      27us        11.1.0(3)
      28.0  USTS   c0010000                                            canceled          5.0sc        11.2.0
      28.2  USTS   c0000005                                            no response        10sc        16.1.0
      28    RESET                                                                         68us        17.1.0
      28    ok                                                                           188ms        17.2.0
      28.2  OUT    55 53 42 43  08 e0 6f 89                            USBC..o.          1.9ms        18.1.0
      28    RESET                                                                         19sc        19.1.0(3)
      28    NTSTS  c000009c                                            device data err   5.1sc        19.2.0
    
    

    We are studying SCSI commands. Now our device appears as removable disk in my computer.
    Thank you!!!
    Having problem in answering Read capacity command.

Reply
  • This is bus hound file

    Bus Hound 6.01 capture on Windows XP Service Pack 2 (x86). Complements of http://www.perisoft.net
    
    bulkoutint
    
      Device - Device ID (followed by the endpoint for USB devices)
                (28) USB Mass Storage Device
      Phase  - Phase Type
                CTL   USB control transfer       RESET bus reset
                IN    Data in transfer           USTS  USB status
                NTSTS NTSTATUS value             ok    command complete
                OUT   Data out transfer
      Data   - Hex dump of the data transferred
      Descr  - Description of the phase
      Delta  - Elapsed time from the previous phase to the current phase
      Cmd... - Position in the captured data
    
    
    Device  Phase  Data                                                Description       Delta  Cmd.Phase.Ofs(rep)
    ------  -----  --------------------------------------------------  ----------------  -----  ------------------
      28.0  CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR     26sc         1.1.0
      28.0  IN     12 01 00 02  00 00 00 40                            .......@          3.6ms         1.2.0
      28.0  CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR     36us         2.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         2.2.0
      28.0  CTL    80 06 00 02  00 00 20 00                            GET DESCRIPTOR     32us         3.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         3.2.0
      28.0  CTL    80 06 00 03  00 00 02 00                            GET DESCRIPTOR     28us         4.1.0
      28.0  IN     04 03                                               ..                3.9ms         4.2.0
      28.0  CTL    80 06 00 03  00 00 04 00                            GET DESCRIPTOR     28us         5.1.0
      28.0  IN     04 03 09 04                                         ....              3.9ms         5.2.0
      28.0  CTL    80 06 0c 03  09 04 02 00                            GET DESCRIPTOR     25us         6.1.0
      28.0  IN     1a 03                                               ..                3.9ms         6.2.0
      28.0  CTL    80 06 0c 03  09 04 1a 00                            GET DESCRIPTOR     27us         7.1.0
      28.0  IN     1a 03 41 00  42 00 43 00                            ..A.B.C.          3.9ms         7.2.0
      28.0  CTL    00 09 01 00  00 00 00 00                            SET CONFIG         34us         8.1.0
      28.0  CTL    01 0b 00 00  00 00 00 00                            SET INTERFACE      38ms         9.1.0
      28.0  CTL    a1 fe 00 00  00 00 01 00                            GET MAX LUN        39ms        10.1.0(3)
      28.0  USTS   c0000004                                            stall pid         4.3ms        10.2.0
      28.0  CTL    02 01 00 00  00 00 00 00                            CLEAR FEATURE      27us        11.1.0(3)
      28.0  USTS   c0010000                                            canceled          5.0sc        11.2.0
      28.2  USTS   c0000005                                            no response        10sc        16.1.0
      28    RESET                                                                         68us        17.1.0
      28    ok                                                                           188ms        17.2.0
      28.2  OUT    55 53 42 43  08 e0 6f 89                            USBC..o.          1.9ms        18.1.0
      28    RESET                                                                         19sc        19.1.0(3)
      28    NTSTS  c000009c                                            device data err   5.1sc        19.2.0
    
    

    We are studying SCSI commands. Now our device appears as removable disk in my computer.
    Thank you!!!
    Having problem in answering Read capacity command.

Children