5 Forum Posts
I'm using the USBUART component from app note EP60246 but the question might also be valid for other USB interfaces.
Everything works fine until the USB cable to the PC is unplugged. Now USBUART_bGetConfiguration() still reports a non-zero value. If I replug the PC and try to write to it USBUART_Write() fails to return.
How can I detect the unplug and reconnect and reinitialize my USBUART component when possible?