0

Feather M0 power up issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 power up issue

by LaJq on Wed Aug 21, 2019 2:35 am

I have a battery powered project with a Feather M0 Basic Proto. The code is working fine, but when I switch off the power the Feather won't start up again. Actually the hole program seems deleted and I have to enter bootloader mode to download the blink program. Then I can download my project again and everything works as expected.
Note, the power switch is cutting the battery power directly, I'm not using the 'En' pin which disables the 3V3 regulator. It's a cheap power switch probably with a lot of contact bounce but I think the behaviour is very odd?

LaJq
 
Posts: 3
Joined: Wed Aug 21, 2019 2:21 am

Re: Feather M0 power up issue

by adafruit_support_carter on Thu Aug 22, 2019 3:31 pm

Is it showing the behavior even with the basic blink example? It's blinking away, cut power, reapply power, and no more blinking?

adafruit_support_carter
 
Posts: 13003
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 power up issue

by bigwaved on Fri Aug 23, 2019 12:56 pm

is your code waiting for:

while (!Serial);

That one caught me for a bit.
If you unplug USB, Serial line is gone so board appears to hang.

-D

bigwaved
 
Posts: 4
Joined: Sun Jul 28, 2019 3:13 pm

Re: Feather M0 power up issue

by LaJq on Sat Aug 24, 2019 3:56 am

bigwaved wrote:is your code waiting for:

while (!Serial);

That one caught me for a bit.
If you unplug USB, Serial line is gone so board appears to hang.

-D

No, but my code is waiting for an accelerometer in setup(), which could explain the behaviour.
The M0 could be very busy in while(1). I didn't attach a serial monitor because I was looking in the wrong direction.
What confused me was that I could not create the problem in the lab only in the field.
Thanks for the support

Code: Select all | TOGGLE FULL SIZE
if (!ADXL345.begin()) {
      /* There was a problem detecting the ADXL345 ... check your connections */
      Serial.println("Ooops, no ADXL345 detected ... Check your wiring!");
      while (1);
   }
Last edited by LaJq on Sat Aug 24, 2019 4:13 am, edited 1 time in total.

LaJq
 
Posts: 3
Joined: Wed Aug 21, 2019 2:21 am

Re: Feather M0 power up issue

by LaJq on Sat Aug 24, 2019 4:04 am

adafruit_support_carter wrote:Is it showing the behavior even with the basic blink example? It's blinking away, cut power, reapply power, and no more blinking?

I have not been able to stall the blink example, but I believe that bigwaved may have identified the root cause.
Thanks for the support

LaJq
 
Posts: 3
Joined: Wed Aug 21, 2019 2:21 am

Re: Feather M0 power up issue

by adafruit_support_carter on Tue Aug 27, 2019 12:19 pm

Yep, sounds like it's getting stuck in a while loop for some reason. The blink example was to check that by using something that did not have such a loop. Sounds like you're on the right track. Good luck!

adafruit_support_carter
 
Posts: 13003
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.