Hi
Mass Storage Class ehci.c file has a function called MS_Host_SendReceiveData. This has a forever loop at - while(!Pipe_IsStatusOK(portnum)). So far we never had an issue but last two days the system gets caught in this forever loop. Without compromising normal operation, we would like add some timeout. Instead of waiting forever to get OK message, return with an error. What would be the reasonable timeout?
Thanks
Hi,
First of all sorry for the late replay.
There isn't an specific time for this, as far as I see, sometimes is used 3000 ms or 5000 ms, but this will be depending of your application.
The think that I found strange is that the code is getting stuck, which version of LPCOpen are you using and which MCU?
Best Regards,
Alexis Andalon
Thanks for the reply.
We are using LPC4357 and LPCopen2.20.
Regards
Hi S_S,
The last LPCOpen version is the 3.02, could you try using this version?
You can found it here:
Let me know if this helps you.
Best Regards,
Alexis Andalon
Which version of LPCopen has more stable USB mass storage device drive?
In your LPCopen USB mass storage host device driver there are many assert_status_Ok call is there. Looks like it puts the system in forever loop. Was this Assert_Status_OK for debug purposes?
That structure is used to write 8 bits at a time, that is not the one creating forever loop. Please let us know what is teh reasonable timeout. Don't want system to hang in forever loop.
We also need to know what is causing this forever loop?
Thanks
In USB_Pipe_Data_t structure PipeHandle is a uint32_t. In pipe.c - HcdOpenPipe function takes pointer to PipeHandle and passes this pointer to PipehandleCreate function which internally treats that as pointer to a structure. So far the code was working most likely that address accidentally free. Did you have any fix for this?
Thanks