Connecting a computer via USB to configure the PixHawk provides power. I do NOT recommend connecting any additional power source (e.g. LiPo batteries) while connected to USB. It is unnecessary for configuring.
I believe the PixHawk is well-designed enough to prevent double-powering problems, but I don’t know for sure and wouldn’t want to risk damage.
If you need to configure the PixHawk while also using batteries (e.g. to spin motors, or move servos) then I recommend powering via batteries, and connecting via the telemetry radio link.
I have a few cases where USB will not provide sufficient power to boot up a system, and power has to be used.
Pixhawk 2.1
Pixhawk 1
APM 2.5
With the array of sensors and peripherals connected to them there isn’t an option.
Plug in the USB and you just get a quiet ticking, it needs the battery connected to get it booted then add the USB.
It is not ideal, especially when I have to do FW upgrades, but there is no other way short of pulling the whole copter apart.
And thats not going to happen.
Having the props off is probably a good idea when doing FW upgrades.
But I have never had an issue with double powering causing a problem.
Your milage may vary.
In my experience a bare Pixhawk will run just fine on USB, but if you’ve got other items connected to it (camera gimbal, receivers with telemetry sensors etc) it may not be able to supply everything.
As long as you’ve got no props on or it’s otherwise disabled you should be ok to have the battery connected. I haven’t had any problems anyway.