Thanks for the suggestion, I already am powering the mbed from a 12V-5V DC converter (the 12V coming from the house alarm panel), so the USB can be unplugged.
And I just did an experiment and left the USB unplugged from the computer, and I still got a reset, so I can't blame the PC after all.
Is there a software problem that could cause a reset (as opposed to a hard fault where I have a handler that will pause the mbed until reset)?
Or would it have to be a hardware issue eg. supply instability or noise? I have a pushbutton connected to the reset pin.
PS If you are wondering how I know there is a reset, I am updating a counter every few seconds and writing it to pachube. I am resetting it at midnight, but if it goes to zero at other times then it must be because of a reset of the mbed. The mbed carries on counting after the reset though, and does not freeze.
I am using my mbed as a home automation controller and it is connected via the USB to a home theatre PC that spends most of its time suspended. It appears that when I wake the PC, the mbed is reset. Is there some way I can avoid this and still leave the PC and mbed connected physically (in case of remote programming needs).
Note I'm running some software on the PC called LEDSdriver which may scan the serial ports, but I wouldn't expect it to cause a break.