USB CDC communication
Hi all,
I am trying to USB CDC communication with my STM32 nucleo board. I want to send consecutive numbers and verify that they are consecutive and calculate the data rate.
I obtain errors, non consecutive numbers (irregularly), when I increase the amount of bytes I send. What can I do to solve this problem?
This is the code that I am using to send consecutive numbers:
uint32_t data[32];
USBD_StatusTypeDef status = 0 ;
while (1)
{
for (uint16_t i=0; i<32; i++)
{
data[i]=cnt++;
}
//HAL_Delay(1);
status = USBD_FAIL;
while (status != USBD_OK){
status = CDC_Transmit_FS(data, sizeof(data));
}
}
