Hi,
I have connected USB flash drive to F28069 and can successfully read/write.
While testing, if USB connector is shaken or there is loose connection program goes into an endless loop shown below.
Even if USB is reset, connection is not reestablished.
unsigned long USBHCDPipeWrite(unsigned long ulPipe, unsigned char *pucData,unsigned long ulSize)
{
....
....
// Wait for a status change.
while(g_sUSBHCD.USBOUTPipes[ulPipeIdx].eState == PIPE_WRITING){} // here program gets in loop
....
....
}
or at
unsigned long USBHCDPipeRead(unsigned long ulPipe, unsigned char *pucData,unsigned long ulSize){
....
....
// Wait for a status change.
while(g_sUSBHCD.USBINPipes[ulPipeIdx].eState == PIPE_READING){} // here program gets in loop
....
....
}
How can I fix this problem? Any suggestions?
Regards,
Naresh