It can be a good idea to simulate a device disconnect after program start to force a bus reset. This removes all ambiguity after startup.
Otherwise you should be more clear about what you actually want to accomplish with your code. Is there an actual issue or is this a general question?
- usbDeviceDisconnect(); /* do this while interrupts are disabled */
_delay_ms(500);
usbDeviceConnect();
Otherwise you should be more clear about what you actually want to accomplish with your code. Is there an actual issue or is this a general question?