AnsweredAssumed Answered

Windows 7 not shutting down with usb cdc device attached

Question asked by cadwell.john on Aug 22, 2012
Processor : stm32f207, usb cdc as a VCOM based on stm demo code ver 1.0 with several fixes and a few additions.  Running in device mode, full speed, usb powered.

The system operates normally when the windows application is running.

On windows shutdown, the pc hangs in the 'shutting down' screen, and after several minutes enters the blue screen of death.  Unplugging the usb device causes immediate (normal) shutdown.

On the packet sniffer, every two seconds I see:
2000 SOF (every 1 msec)
No activity on endpoint 0
63 IN_NAK on endpoint 2 (control endpoint) (every 30 msec)
139,905 IN_NAK on endpoint 1 (data endpoint) (every 12 usec)

There is no SUSPEND during shutdown when failure occurs.
The timing changes a bit with a usb hub between the device and the host computer, but the problems persist.

The only interrupts are for SOF, at 1000 per second.

I have Ver 2.1, but it has diverged too much to import very much.
On code comparison, there are no obvious differences in usb interrupt handling, setup, or endpoint operations.
Inspection of usb registers was not revealing : force NAK bits were not set in endpoints, etc.

Other non-stm usb devices do not exhibit this behavior.

1) Is this a known issue, and if so, the fix?
2) Does ver 2.1 exhibit the same problem?
3) Anything else you would look at, or need to know?