I am trying to mimic the TI ROM Code USB Download functionality in my bootloader. This bootloader is loaded into the internal SRAM from an eMMC device by the TI ROM code. My bootloader will initialize HW needed to load out real image into the SDRAM. This is very similar to x-loader, but I have special HW to initialize like an FPGA.
So far I have been able to get this to work rather well. I am able to RAM load an image into the SDRAM and run it.
However, once in awhile, my initialization of the OTG controller and/or the power management chip (TPS65950) does not allow the host to 'see' the OMAP. In fact, using a USB sniffer, I do not see any usb packets get transferred when this happens.
When this happens, only a hard power reset fixes it and I have to set my sys_boot jumpers on the OMAP so that USB peripheral boot happens before the eMMC boot.
I have spent a long time trying to figure out why this happens.
Since the TI ROM Code seems to correct this issue, I was wondering if it is possible to get any documentation (either pseudocode or actual code) of what the TI ROM code is doing during USB peripheral boot? I know about the chapter in the TRM that discusses the USB peripheral boot. I am looking for detailed register setup of the OTG controller and the Power Management Chip.
Thanks
Ray