Question
Virtual Com Stm32f429
Hello All
This is my first try of Vcom ;
I can trasmit to PC but I cant receive from PC ;
/* Init Device Library */
USBD_Init(&USBD_Device, &VCP_Desc, 0);
/* Add Supported Class */
USBD_RegisterClass(&USBD_Device, USBD_CDC_CLASS);
/* Add CDC Interface Class */
USBD_CDC_RegisterInterface(&USBD_Device, &USBD_CDC_fops);
/* Start Device Process */
USBD_Start(&USBD_Device);
USBD_CDC_SetTxBuffer(&USBD_Device, UserTxBuffer, 0);
USBD_CDC_SetRxBuffer(&USBD_Device, &UserRxBuffer[0]);
sprintf((char *)UserTxBuffer, "TEST VCOM 2019 \n\r");
HAL_Delay(1000);
/*
/* Run Application (Interrupt mode) */
while (1)
{
USBD_CDC_SetTxBuffer(&USBD_Device, (uint8_t*)&UserTxBuffer[0], 17);
if(USBD_CDC_TransmitPacket(&USBD_Device) == USBD_OK)
{
}
HAL_Delay(1000);
USBD_CDC_SetRxBuffer(&USBD_Device, &UserRxBuffer[0]);
USBD_CDC_ReceivePacket(&USBD_Device);
}I use a termal program to recieve and send data from PC side ;
I can see the send data by STM32f429 but I cant see the data received bt STM32 in userRxBuffer
what I am missing here ?
Thank you inadvaced