Question
VCP - closing COM port causes MCU enter the interrupt loop
Posted on August 09, 2012 at 15:40
Hi!
I've got another problem with my STM32F207ZE and the USB VCP. My application (on STM) is running and LEDs are blinking :). It send by USB (VCP) to PC some text. When I close port in terminal on the PC the program continue to works, but after few minutes it enter an ''ISR loop''. It sequentially enters OTG_HS_EP1_IN_IRQHandler(). Program goes to USBD_OTG_EP1IN_ISR_Handler() than calls DCD_WriteEmptyTxFifo(pdev, 1); CLEAR_IN_EP_INTR(1, emptyintr);After exit from ISR it enter it again, and again, and again... my application looks like halted. When I connect again my COM port on the PC - the application continues to work. What can I do with it? How to detect, that port is ''closed'' and not to send the data to it? Any idea? I'm sure that i'm not the first who have this problem. The application is USB-OTG-Example's based. Best regardsKonoppo #stm32-vcp-usb