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
  • Current status ->
    I am stuck at same position. This is bus hound file -

    
    Device  Phase  Data                                                Description       Delta  Cmd.Phase.Ofs(rep)
    ------  -----  --------------------------------------------------  ----------------  -----  ------------------
      28.0  CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR    6.7mn         1.1.0
      28.0  IN     12 01 00 02  00 00 00 40                            .......@          3.2ms         1.2.0
      28.0  CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR     30us         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     27us         3.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         3.2.0
      28.0  CTL    00 09 01 00  00 00 00 00                            SET CONFIG         34us         4.1.0
      28.0  CTL    01 0b 00 00  00 00 00 00                            SET INTERFACE      40ms         5.1.0
      28.0  CTL    a1 fe 00 00  00 00 01 00                            GET MAX LUN        39ms         6.1.0
      28.0  IN     00                                                  .                 3.8ms         6.2.0
      28.2  OUT    55 53 42 43  08 50 67 89      /* CBW without RESET *               USBC.Pg.        1.9ms         7.1.0(2)
      28.2  IN     00 80 00 02  1f 80 00 00                            ........          1.9ms         8.1.0(2)
      28.2  IN     55 53 42 53  08 50 67 89                            USBS.Pg.          2.0ms         9.1.0(2)
      29    CMD    12 00 00 00  24 00                                  INQUIRY            68ms        13.1.0
      29    IN     00 80 00 02  1f 80 00 00                            ........            5us        13.2.0
      29    CMD    25 00 00 00  00 00 00 00                            READ CAPACITY     6.0ms        14.1.0
      29    SSTS   09                                                  timeout           9.0sc        14.2.0
      28    RESET                                                                         68us        15.1.0
      28    ok                                                                           186ms        15.2.0
      29    CMD    25 00 00 00  00 00 00 00                            READ CAPACITY     810ms        16.1.0
      28.2  OUT    55 53 42 43  c0 92 3b 89                            USBC..;.          1.8ms        17.1.0
      28.2  IN     00 00 00 1f  00 00 02 00                            ........          1.9ms        18.1.0
      28.2  IN     55 53 42 53  c0 92 3b 89                            USBS..;.          1.9ms        19.1.0
      29    IN     00 00 00 1f  00 00 02 00                            ........            7us        16.2.0
      29    CMD    28 00 00 00  00 00 00 00                            READ               20us        20.1.0
      28.2  OUT    55 53 42 43  c0 92 3b 89                            USBC..;.          1.9ms        21.1.0
      28.2  IN     00 00 00 1f  00 00 02 00                            ........          2.0ms        22.1.0
      28.2  IN     55 53 42 53  c0 92 3b 89                            USBS..;.          999us        23.1.0
      29    IN     00 00 00 1f  00 00 02 00                            ........            6us        20.2.0
      29    SSTS   52                                                  data overrun        3us        20.3.0
      29    CMD    28 00 00 00  00 00 00 00                            READ              496ms        24.1.0
      29    SSTS   49                                                  timeout           9.4sc        24.2.0
    
    


    I am not getting mass storage class reset at all.
    Even before 1st CBW, there is no reset.
    SCSI commands continue to come. So i don't get whether i have answered command properly or not.

Reply
  • Current status ->
    I am stuck at same position. This is bus hound file -

    
    Device  Phase  Data                                                Description       Delta  Cmd.Phase.Ofs(rep)
    ------  -----  --------------------------------------------------  ----------------  -----  ------------------
      28.0  CTL    80 06 00 01  00 00 12 00                            GET DESCRIPTOR    6.7mn         1.1.0
      28.0  IN     12 01 00 02  00 00 00 40                            .......@          3.2ms         1.2.0
      28.0  CTL    80 06 00 02  00 00 09 00                            GET DESCRIPTOR     30us         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     27us         3.1.0
      28.0  IN     09 02 20 00  01 01 01 60                            .. ....'          3.9ms         3.2.0
      28.0  CTL    00 09 01 00  00 00 00 00                            SET CONFIG         34us         4.1.0
      28.0  CTL    01 0b 00 00  00 00 00 00                            SET INTERFACE      40ms         5.1.0
      28.0  CTL    a1 fe 00 00  00 00 01 00                            GET MAX LUN        39ms         6.1.0
      28.0  IN     00                                                  .                 3.8ms         6.2.0
      28.2  OUT    55 53 42 43  08 50 67 89      /* CBW without RESET *               USBC.Pg.        1.9ms         7.1.0(2)
      28.2  IN     00 80 00 02  1f 80 00 00                            ........          1.9ms         8.1.0(2)
      28.2  IN     55 53 42 53  08 50 67 89                            USBS.Pg.          2.0ms         9.1.0(2)
      29    CMD    12 00 00 00  24 00                                  INQUIRY            68ms        13.1.0
      29    IN     00 80 00 02  1f 80 00 00                            ........            5us        13.2.0
      29    CMD    25 00 00 00  00 00 00 00                            READ CAPACITY     6.0ms        14.1.0
      29    SSTS   09                                                  timeout           9.0sc        14.2.0
      28    RESET                                                                         68us        15.1.0
      28    ok                                                                           186ms        15.2.0
      29    CMD    25 00 00 00  00 00 00 00                            READ CAPACITY     810ms        16.1.0
      28.2  OUT    55 53 42 43  c0 92 3b 89                            USBC..;.          1.8ms        17.1.0
      28.2  IN     00 00 00 1f  00 00 02 00                            ........          1.9ms        18.1.0
      28.2  IN     55 53 42 53  c0 92 3b 89                            USBS..;.          1.9ms        19.1.0
      29    IN     00 00 00 1f  00 00 02 00                            ........            7us        16.2.0
      29    CMD    28 00 00 00  00 00 00 00                            READ               20us        20.1.0
      28.2  OUT    55 53 42 43  c0 92 3b 89                            USBC..;.          1.9ms        21.1.0
      28.2  IN     00 00 00 1f  00 00 02 00                            ........          2.0ms        22.1.0
      28.2  IN     55 53 42 53  c0 92 3b 89                            USBS..;.          999us        23.1.0
      29    IN     00 00 00 1f  00 00 02 00                            ........            6us        20.2.0
      29    SSTS   52                                                  data overrun        3us        20.3.0
      29    CMD    28 00 00 00  00 00 00 00                            READ              496ms        24.1.0
      29    SSTS   49                                                  timeout           9.4sc        24.2.0
    
    


    I am not getting mass storage class reset at all.
    Even before 1st CBW, there is no reset.
    SCSI commands continue to come. So i don't get whether i have answered command properly or not.

Children