Thanks, TIC. Happy to do it. We are using IAR workbench. Should I send *.hex, *.sim and *.out files? Also, also how to get a USB trace file?
In our board, we have no external PHY for USB1. So USB1 - Mass storage host in our product and USB0 - HID device.
USB0 - HID device.
After enabling both USB ROM stack(USB0) and HOST stack for USB1, we are calling a function that writes a small file into USB. When we switch on the system by inserting a USB stick, we encounter the problem we described earlier. The program execution never comes out of the write a file to USB function because of the problem we described earlier. Everything else is the same, but when we run the program without inserting a USB stick, things work as expected because the USB write function which internally calls f_open, detects that there is no stick and without the USB device there won't be any device connect interrupt.
Since I am not able to upload files here, I am sending those files through an email.
I am sending the files as it is. If you run into problems due to our custom board, please let me know.
Thanks