XIAO nRF52840 does not boot from battery


I have two kits xiao nRF52840(not Sense version). And I’m trying to create a battery powered application and my board won’t boot up after connecting the battery. I have checked the voltage at the input to the board from the battery and I see 3.8V on it, but the board draws 15mA pulse and won’t boot. Then when I connect to the board via USB, it looks like the program has disappeared from the board because it won’t start even from USB. When I subsequently reload the application via USB, it starts and if I have the battery connected and disconnect the USB, the board continues to run, but if I disconnect the battery and reconnect it, the board does not start and the program disappears from the board.

When I have connected battery, I can measure 3V3 on 3V3 pin.

Here’s my power consumption measurement, but I’m not sure it’s useful.

Hi Flamy69,
NO it doesn’t appear to be correct. Two things come to mind with no Battery connected what happens when you plug in the usb? Does it register to windows?
Your PPK2 looks to be in Source mode not Amp-meter mode?

What are you using to program?
GL :slight_smile:

Hi, the problem was in me :frowning: after your comment I wanted to post a basic program with the same problem and it started working. So I checked everything and my code contained this:

  while ( !Serial ) delay(10);   // for nrf52840 with native usb

I copied this from some example and when it runs off the battery, there is no USB connected.