USB Mass Storage on OMAPL138
Hi all!
Our application, based on OMAP-L138, requires USB Mass Storage support.
We ported StarterWare'code in our environment (proprietary realtime RTOS) and doing normal correct actions everything seems to work.
If tested in extreme conditions, sometimes system hangs (eg .: extraction of the USB stick while you are reading or writing a file).
In particular, two situations may occur:
1) The system stops waiting for an HW condition that will not occur (for example cpp41dma.c line 533, but is not the only while case).
2) The USB starts generating interrupt continuously (one every 10 usec). USB0HostIntHandler() read 0 from INTSRCR (no interrupt pending?) and the final write of 0 to EOIR immediately retrigger a new interrupt.
Thinking of porting problems in our environment we did tests with your example application (OMAPL138_StarterWare_1_10_04_01\examples\lcdkOMAPL138\ usb_host_msc).
Simply removing the USB stick while the cat of a file is ongoing hangs the system in the above described case 1).
Questions:
* Don't you should avoid potentially endless waiting situation? (can we use a timeout? how long? which action shoud be taken on timeout?)
* How is it possible to have interrupts while INTSRCR is read as 0?
* Inside the function USBHostIntHandlerInternal() variable ulStaus is OR-ed with the return value of the function USBIntStatusControl (). I cannot find any doocumentation for registers accessed in that function inside OMAP-L138 TRM (spruh77a.pdf). What do I miss?
* Is the driver designed to correctly manage unplug while working? (We can accept problems on the USB key's filesystem if not correctly synced but I would expect no problem on the host side).
* Is there any available update for the driver?
Thanks in advance.
Andrea