Using the Seeed Xiao Nrf52840 board in the Arduino IDE (1.8). I have tried several of the “getting started” sketches, including the Blink and the BLE controlled Blink. In addition, i have modified the DHT11 sketch to instead use the Bosch BMP180 Temp and Pressure sensor.
All 3 of these work fine when they are uploaded to the Nrf52840 board. They run and can be scanned and connected to using the Nrf Connect applicationon my Android phone.
The simple Blink sketch (no BLE) also starts automatically when attached to a battery pack or an USB hub, similar to the Arduino behavior.
However, with the other two sketches (BLE controlled blink and BMP180) this does not occur. When the USB connection is moved to a hub or battery pack, the Nrf52840 powers down and apparently does not restart. Scanning with Nrf Connect does not find the 52840. Instead, I have to re-connect to the Arduino IDE and re-upload the sketch, at which point everything works again.
I suspect that I’m overlooking something very simple, but have not found it. Any help?