On 01/27/2014 01:16 PM, Joerg Wunsch wrote:
I restricted the usb_reset() call to #if defined(__linux__).

This thread went by a week or so ago, but now I'm running into a problem caused by this exact line of code.

I have several custom programming jigs based on a USB xmegas that implement STK500v2 over USB as well as two CDC serial ports, in a composite device. The problem is that the usb_reset() causes the serial port to disappear and reset, which screws up my computer-side software pretty badly.

When I remove the usb_reset() line, avrdude continues to work normally, and it doesn't reset my CDC devices. My software happily maintains open serial connections and all is well.

Why is usb_reset() there in the first place? If there's a specific error case when it actually helps, it'd be ideal if that case can be detected and usb_reset() only called when absolutely necessary. Either way at this point some code comments would probably be in order to explain why.

Thanks!

_______________________________________________
avrdude-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to