I've been looking at the usb_host_msc USB host example in TI\TivaWare_C_Series-2.1.2.111\examples\boards\ek-tm4c1294xl\usb_host_msc. I'm using IAR v7.30. The code builds fine. However despite the connected terminal displaying a welcome message and notification of USB stick connect & disconnects the rest of the system fails to respond to typed commands.
Here's more detail.
Using the EK-TM4C1294XL launchpad, the terminal prompt appears with the initial welcome message of 'HUSB Mass Storage Host program', followed by 'Type 'help' for help.' About 2% of the time I get the full command menu after the 'Type 'help' for help.' message. Whether I get the command menu or not, any command typed on the terminal is only echoed back from the board and not acted upon. Nor does it produce any other error message. It's definitely echoed from the launchpad and not a local terminal echo as you can see the time shifted return comms traffic on the RS232 bus.
When the USB stick connects, or disconnects, I always get the prompt change from 'NODEV>' to '/>', and the terminal message notifying of this is 100% reliable.
+5v volts is always present on the USB connector, and under control of TPS2052 & PD6. +5v is fed to the board by connecting the +5v to the commoned side of JP1 pins 2,4&6 and there's no jumper installed on JP1.
When the USB stick is connected, traffic appears on the USB bus which is a short (about 20bits) repetitive packet sequence (fixed header but varying back end) running at 12Mbs and repeating at 1Khz. I assume this is in sync with the tick rate of the application. A fairly new USB2.0 capable stick, and a USB stick that's about 10 years old produce exactly the same result. So does moving the whole thing to a brand new EK-TM4C1294XL board.
If I set breakpoints in the code USBHCDMain in usbhostenum.c is called repeatedly if the USB stick is inserted. So is USBHCDInitInternal in the same file.
USB0OTGModeIntHandler is called when the USB stick is inserted, or is already inserted on reset.
The problem seems similar to this thread:
e2e.ti.com/.../1676996
except the code here gets a bit further.
Any ideas why the command interface doesn't work?