2 Replies Latest reply on Oct 14, 2018 6:19 PM by us16c_3774766

    usb device cdc sample can not send 512byte

    us16c_3774766

      I am checking USB Device CDC funciton on CWY943907AEVAL1F. I use WICED-Studio-6.2.

      I modified the snip.usbx_usb_device.usb_device_cdc_acm_read_write to send data from device to host.

      I called  ux_device_class_cdc_acm_write function like below.

      I connected the device to PC(USB Host).

      The case '1' is OK, but in  case '2'  the transmission is not done as expected.

       

      Is there a limit on the size of one transmission?

       

       

      '1'     

      for (int i = 0; i < 1000; i++) {

           ux_device_class_cdc_acm_write( cdc_acm, tempbuf, 256, &actual_length );     // OK

      }

       

      '2' 

      for (int i = 0; i < 1000; i++) {

           ux_device_class_cdc_acm_write( cdc_acm, tempbuf, 512, &actual_length );     // NG

      }

       

      '3' 

      for (int i = 0; i < 1000; i++) {

           ux_device_class_cdc_acm_write( cdc_acm, tempbuf, 511, &actual_length );     // OK

      }