Immediately after a code flash, still plugged into USB, trying to activate the wifi radio always causes a reboot. Does not happen after manual hard reset, only after flash. Doesn't matter how long I delay activating WiFi. Device is brand new. Battery reads 4.24V.
This always causes a boot loop
void setup() {
delay(10000);
WiFi.mode(WIFI_STA);
}
A physical power off/on cycle stops the rebooting.