My MCU is an AT91SAM7se256.
In my application, the MCU is backed by a battery (performing tasks even without USB connection), so it is always on regardless of USB connection status. The problem however is that I cannot get the USB peripheral to clear the addressed bit in the UDP_GLB_STAT register (designed that way according to the data sheet), so when I attach the USB cable to a Linux box for the second time, the host fails a number of times before a successful attachment can be made. I suspect this being due to the USB peripheral reporting being in the addressed state despite the fact that it should walk the USB state-machine from the beginning just like when having booted from reset.
Any suggestions on how to make a “hot” USB attach look the same to the host as a “cold” USB attach with a system that has been through reset?