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

SMT32 USB endpoint(out) is not working

Hi,

I'm facing another problem with my SMT32F103 processor, using the usb interface. My endpoint(out) is not working at all.

If I use WriteFile() in my visual c++ project to write some data to the endpoint(out) or to the endpoint(0) nothing happens. I've used one usb sniffer to see if there's any kind of usb traffic using WriteFile() but there's nothing... The initialization is working; all endpoints(IN) are also working as expected.

Here's my keyboard report descriptor:

const BYTE HID_ReportDescriptor[] = {
  HID_UsagePage          ( 0x01                     ),  //generic desctip
  HID_Usage          ( 0x06                     ),  //keyboard
  HID_Collection     ( HID_Application          ),

    HID_ReportSize   ( 8                        ),  // 8 bits
        HID_LogicalMin   ( 0x00                         ),  // value range: 0 - 0xFF
        HID_LogicalMax   ( 0x03                         ),  // value range: 0 - 0xFF
    HID_ReportCount  ( 1   ),

        HID_UsagePage    ( 0x07),
        HID_Usage( 0x00 ),           // key null - not pressed
        HID_Usage( 0x2C ),           // Space bar
        HID_Usage( 0x51 ),           // Down arrow
        HID_Usage( 0x52 ),           // Up arrow
        HID_Input ( HID_Data | HID_Array ),

        /* output report 1byte [0x00, 0xFF] */
    HID_LogicalMaxS ( 0xFF ),    // value range: 0 - 0xFF
        HID_UsagePageVendor( 0x01 ), // Vendor specific page
        HID_Usage ( 0x01 ),
        HID_Output ( HID_Data | HID_Variable | HID_Absolute ),

  HID_EndCollection,
};

/* I've two report descriptors but the second one has only one endpoint(in) which is
working */
//report descriptor touchscreen
const BYTE HID_ReportDescriptor2[] = {

  HID_UsagePage          ( 0x01                     ),  //generic desktop
  HID_Usage          ( 0x02                     ),  //mouse
  HID_Collection     ( HID_Application          ),
  HID_Usage          ( 0x01                     ),  //pointer
  HID_Collection     ( HID_Physical             ),
  HID_UsagePage          ( 0x01                     ),  //usage page (generic desktop
  HID_Usage          ( 0x30                     ),  //usage(x)
  HID_Usage          ( 0x31                     ),  //usage(y)

  HID_LogicalMin         ( 0x00                         ), //
  HID_LogicalMaxS    ( 800                      ),  //
  HID_PhysicalMinS   ( 0x0000                   ), //
  HID_PhysicalMaxL   ( 32767                    ),  //

  HID_UnitS                      ( 0x0000                                       ),

  HID_ReportSize   ( 16                         ),  // 8 bits
  HID_ReportCount  ( 2   ),


  HID_Input              ( HID_Data  | HID_Variable | HID_Absolute | HID_NullState | HID_NoPreferred),

  HID_EndCollection,
  HID_EndCollection

};

Maybe there someone of you will find some errors.