OK, my MCU was bad - it had broken USB module (even the rest of it worked well) - I replaced it by a new one and USB module works. Now I can see SOF tokens every 1 ms on the bus when I attach my USB flash drive.
But MCU is not able to enumerate the flash drive. As I mentioned above, I use CMX USB stack (MSD host example for MCF52221). Immediatelly after attaching my USB drive the program in MCU reaches following code (it goes inside if):
if (MCF_USB_INT_STAT & MCF_USB_INT_STAT_STALL) { /* device has an error */ MCF_USB_INT_STAT=MCF_USB_INT_STAT_STALL; MKDBG_TRACE(ev_got_stall, ep); tr_error=tre_stall; return((hcc_u16)-1u); }
It's piece of code in usb_host_start_transaction() function. Because of this error (tre_stall) initialization of the device fails. Initialization ends by sending print("Mass-storage driver initialization failure.\r\n"); print("Please connect another device.\r\n"); through RS232.
What cause the problem? The code I use was intended to be used on MCF52221 and 80 MHz system clock. My MCU has 48 MHz system clock, so I modified provided timer function (now it times correctly - tested). But something else is bad probably...what?
Martin