This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB detection and removal - System is get hanged

Hi,

I used Keil sample program for USB detection and removal.

In my case, the USB is got detected and started file writing. But if i removed the USB in between the program is getting hanged.

After further analysis, its found that fclose() is causing the problem.

How could i solve this issue.

Regards,
Arun

Parents
  • What do you expect to happen when you try to close a file on a storage device which is no longer physically connected to your system?!

    Surely, fclose() must require that the filesystem containing the file is still there to be closed?

Reply
  • What do you expect to happen when you try to close a file on a storage device which is no longer physically connected to your system?!

    Surely, fclose() must require that the filesystem containing the file is still there to be closed?

Children