I have got a problem with USB transition using STM32_USB-FS-Device_Lib. The problem is that I am loosing reports during transition. Maybe I do not wait for some bit to be cleared or something else but I cannot find the solution on my own. I have based my program on HID_Custom example from ST. here is code responsible for sending reports:
for(licznik=1; licznik<4000 ; licznik++)
{
Delay(5000);
Send_Buffer[0] = 0x05;
Send_Buffer[1] = 0x00;
UserToPMABufferCopy(Send_Buffer, ENDP1_TXADDR, 2);
SetEPTxCount(ENDP1, 2);
SetEPTxValid(ENDP1);
}
As you can see i should get around 4000 reports and I get only from 20-60. Second strange thing is when I send only one report I will not get it. I would welcome any suggestions. I am nearly sure that I miss something important. I am adding the project in uVision:
USB-Problem->HID->project->RVMDK->Custom_HID.uvproj