AnsweredAssumed Answered

stm32f207vc usb bulk tramission , only 64bytes can be sent?

Question asked by easylwl.easylwl on Apr 10, 2013
Latest reply on Apr 15, 2013 by easylwl.easylwl
I use stm32f207  USB device examples  VCP deom .I change the USB CDC device Configuration Descriptor like this
/*Configuration Descriptor*/
  0x09,   /* bLength: Configuration Descriptor size */
  USB_CONFIGURATION_DESCRIPTOR_TYPE,      /* bDescriptorType: Configuration */
  USB_CDC_CONFIG_DESC_SIZ,                /* wTotalLength:no of returned bytes */
  0x00,
  0x01,   /* bNumInterfaces: 1 interface */
  0x01,   /* bConfigurationValue: Configuration value */
  0x00,   /* iConfiguration: Index of string descriptor describing the configuration */
  0xC0,   /* bmAttributes: self powered */
  250,   /* MaxPower 2 mA */
  
  /*Data class interface descriptor*/
  0x09,   /* bLength: Endpoint Descriptor size */
  USB_INTERFACE_DESCRIPTOR_TYPE,  /* bDescriptorType: */
  0x00,   /* bInterfaceNumber: Number of Interface */
  0x00,   /* bAlternateSetting: Alternate setting */
  0x02,   /* bNumEndpoints: Two endpoints used */
  0xff,   /* bInterfaceClass: USER */
  0x00,   /* bInterfaceSubClass: */
  0x00,   /* bInterfaceProtocol: */
  0x00,   /* iInterface: */
 
  //18
 
  /*Endpoint OUT Descriptor*/
  0x07,   /* bLength: Endpoint Descriptor size */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType: Endpoint */
  0x03,                        /* bEndpointAddress */
  0x02,                              /* bmAttributes: Bulk */
  0x40,  /* wMaxPacketSize: */
  0,
  0,                              /* bInterval: ignore for Bulk transfer */
  //25
  /*Endpoint IN Descriptor*/
  0x07,   /* bLength: Endpoint Descriptor size */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType: Endpoint */
  0x82,                         /* bEndpointAddress */
  0x02,                              /* bmAttributes: Bulk */
  0x40,  /* wMaxPacketSize: */
  0,
  0                               /* bInterval: ignore for Bulk transfer */
  //32

and I send function :
uint16_t VCP_DataTx (uint8_t* Buf, uint32_t Len)
{
uint8_t i;
for (i=0;i<64;i++)      //this number must be multiple  of  64 ,anyother number wil not be send out.
        {
        APP_Rx_Buffer[APP_Rx_ptr_in] = g_ucaHeartbeat;
        APP_Rx_ptr_in++;
         
          /* To avoid buffer overflow */
          if(APP_Rx_ptr_in == APP_RX_DATA_SIZE)
          {
            APP_Rx_ptr_in = 0;
          }  
        }
return USBD_OK;
}

Outcomes