Other Parts Discussed in Thread: TPS2051B, EK-TM4C129EXL
Hello, I have a firmware developed for my product, now I need to add a firmware update functionality.
USB Stick update example from the EK-LM4F232 firmware package caught my attention. So I imported it and made some changes to suit TM4C129ENCPDT, namely:
#define FLASH_SIZE (1024 * 1024) #define HCD_MEMORY_SIZE 256
and modified the vector table accordingly, for USB0HostIntHandler to be at the USB0 IRQ.
The problem is, it does not react to connected USB stick. Actually the program behaves the same if there is a stick in, or not. I have correctly configured and connected the USB0EPEN and USB0PFLT, I use TPS2051B for USB power switching and there is nice 5V there from dedicated power supply. When I plug in the USB stick, the D+ line rises to 3.3V and nothing else happens.
If I step the program, it just loops in UpdaterUSB() while(1) loop, and iOldState for devices 1-5 devices is just eHCDIdle. For device 0 which I assume is the internal hub, state cycles between
eHCDDevAddressed, eHCDIdle, eHCDDevDisconnected, eHCDDevConnected, eHCDDevConnectedHub, eHCDDevRequest, eHCDDevReset and again eHCDDevAddressed, forever.
Any ideas?
Thanks!