AnsweredAssumed Answered

CubeMx 4.14 F4 1.11 Virtual COM Port Problem

Question asked by adib on Mar 27, 2016
Latest reply on Mar 28, 2016 by adib
please read my post under
[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32%20Virtual%20Com%20Port%20problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx?View%3D%257bA4EEE515%252d04F0%252d42D9%252dAC32%252dA6D8340F101B%257d%26FolderCTID%3D0x012001&currentviews=161]Virtual COM Port problem [solved] link

current generated code for CDC_Receive_FS is wrong.

Also see my current coding patch below.

Regards, Adib.

static int8_t CDC_Receive_FS (uint8_t* Buf, uint32_t *Len)
{
  /* USER CODE BEGIN 6 */
  // USBD_CDC_SetRxBuffer(hUsbDevice_0, &Buf[0]);
  // USBD_CDC_ReceivePacket(hUsbDevice_0);
  usb_cdc_rx_handler(Buf, *Len);
  return (USBD_OK);
  /* USER CODE END 6 */
}

Outcomes