[Solved] Booting with no regulator

Started by davegravy, May 04, 2016, 02:22:47 PM

davegravy

Regulator (but not flash) is removed from my M4, and fuses set to 8Mhz. I've wired DTR to ground as I read that's necessary.

After connecting power, in order to get my sketch to run I seem to have to momentarily touch RST to ground... simply connecting power isn't sufficient.

Is this normal? How can I have automatic boot without some elaborate circuit to pulse RST low?

TomWS

Quote from: davegravy on May 04, 2016, 02:22:47 PM
Regulator (but not flash) is removed from my M4, and fuses set to 8Mhz. I've wired DTR to ground as I read that's necessary.

After connecting power, in order to get my sketch to run I seem to have to momentarily touch RST to ground... simply connecting power isn't sufficient.

Is this normal? How can I have automatic boot without some elaborate circuit to pulse RST low?
Are you sure DTR is connected to ground?  I find that I have to do this in most battery powered applications and it always works.

However, given the 'opportunity' for SW to go off into the weeds for a variety of reasons, I've started adding TPL5010 Watchdog timers to every new mote I design (unless it has an RTC chip, that is...).

Tom

davegravy

#2
Yup, as in attached. If I remove the DTR to ground connection, then I can't get it to boot at all even with RST.

That's interesting and I'd like to investigate the TPL5010 but first want to understand what's going wrong here. Any other ideas for how to diagnose it?

If I touch DTR to 3.3V and then to GND I get a reboot. But no reboot if I leave it hard wired to GND and cycle supply power. I'm judging sucessful load by the LED flashing which is the first instruction in setup().

TomWS

Quote from: davegravy on May 04, 2016, 03:14:49 PM
Yup, as in attached. If I remove the DTR to ground connection, then I can't get it to boot at all even with RST.

That's interesting and I'd like to investigate the TPL5010 but first want to understand what's going wrong here. Any other ideas for how to diagnose it?

If I touch DTR to 3.3V and then to GND I get a reboot. But no reboot if I leave it hard wired to GND and cycle supply power. I'm judging sucessful load by the LED flashing which is the first instruction in setup().
I would guess its related to rise time of VDD.  How is your battery connected?  Oh wait!  You're using a coin cell????   Um, now it gets interesting...  I think you might need to mess with BOD settings.

Tom

davegravy

Quote from: TomWS on May 04, 2016, 03:28:33 PM
I would guess its related to rise time of VDD.  How is your battery connected?  Oh wait!  You're using a coin cell????   Um, now it gets interesting...  I think you might need to mess with BOD settings.

Tom

Haha, i'd have chewed through exactly 1,000,000 coin cells by now if I were doing all my testing with them. I'm still using a lab supply at this point until I get really cozy current consumption and things are stable. I was using the default BOD but I just switched it to 1.8V to see if it had any impact... none.

davegravy

Figured it out. I measured voltage between GND and RST and disconnected power. I watched it drop from 3.3V but it took about a minute to get below 400mV due to the RC time constant. Waiting long enough and reconnecting power I get bootup.

Guess I'm just too impatient.

TomWS

Quote from: davegravy on May 04, 2016, 04:21:49 PM
Guess I'm just too impatient.
Been there, done that!  Good sleuthing.  Now on to the next problem!

Tom