2014-05-26 04:05 AM
I use stm32_vcp_1.3.1 application for setting USB FS. I use it to send data to APP on the Win. It work fine but when the APP crush unexpected and the USB port stay open I don't get any announce for it (I have announce on port close or disconnect only) and after some time i see that I stack in the USB interrupt loop '' OTG_FS_IRQHandler '' when it specifice get flags for TxFiFO and SOF.
I can't get out of this loop and couldn't get to my main nether cut this loop or set and announce about it.Is there a way or a function I can use to fine this scenario happened? ThanksBar. #usb-stm32f2052014-05-28 03:35 AM
Hi
'' It work fine but when the APP crush unexpected and the USB port stay open I don't get any announce for it (I have announce on port close or disconnect only)'' It is unrealistic to expect a USB specific event/message to tell USB devices that the HOST has crashed. It is up to the PC application to close/release the USB port when is shuts down. You have not actually stated what USB device you have implemented. ''after some time i see that I stack in the USB interrupt loop '' OTG_FS_IRQHandler '' when it specifice get flags for TxFiFO and SOF. I can't get out of this loop and couldn't get to my main nether'' So it sounds like the PC application crash has left the USB stack doing something bad. It is continuously sending USB frames to you device, probably bad/invalid frames at that. There is nothing you can do in your application except detect invalid frames and reject them. It sounds like the problem is on the PC application side. Is this something you developed?