Teensy 3.2 (and 3.1) occasionally not running on power up!
I wonder if anyone has any experience with this problem before...
I recently noticed that my most recent Teensy 3.2 based project wasn't executing code occasionally, maybe 1 in every 20 power ups. I did some investigation and this is what I've found so far:
1. When the Teensy fails to execute code, 3.3V is still present and the teensy is drawing 20mA from my +5V supply compared to 40mA when the Teensy is executing code.
2. It seems more likely to happen during quick power on-off-on cycles, but also happens during a power on after a long duration of being off.
3. One of the things I tried was different value capacitors on my +5V supply and Teensy's 3.3V supply. All combinations, including no additional capacitors would still occasionally have the Teensy not executing code on power-up.
4. If a large value capacitor was placed on Teensy's 3.3V supply and left to slowly discharge after power off, powering on my +5V supply just as the +3.3V was at 350mV would almost always guarantee that the Teensy would not execute code!
I'm at a loss for this one, but #4 is pretty interesting.. so I can't help thinking there's some sort of weird condition happening during power-up that hangs the Teensy. Also of note:
5. The behavior is the same with the Teensy 3.1 that I also have, so it's not an issue with the Teensy itself.
6. It is also not code related, I uploaded the blink sketch for my tests.
About my setup:
I am powering the Teensy with +5.00V applied to the Vin pin with the VUSB trace cut on the back (but no USB cable present for the tests). My +5.00V is coming from an L78L05 with a .1uF ceramic capacitor on the output and nothing else connected to it.
Here's some scope shots of the +5V supply and the Teensy's 3.3V supply in the 30ms after power is applied. I was hoping to see some sort of pattern indicating why the Teensy occasionally decides to not execute code on power up, but I can't see any differences. I'll also add that I'm also able to get the Teensy to not start if I use my bench power supply for the +5V, these scope shots were with the L78L05 though.
Last edited by gatheround; 09-12-2020 at 01:49 AM.
I’m surprised by the unreliability of the blink program under these circumstances.
Are you saying blink does not blink the LED one in every 20 restarts?
Is this truly a plain vanilla Teensy 3.2 running blink, with VUSB cut, and powered by 5v on Vin?
Could you provide a wiring diagram? Is it 1 wire on Vin?
I’m surprised by the unreliability of the blink program under these circumstances.
Are you saying blink does not blink the LED one in every 20 restarts?
1 in every 20 is just a guess, sometimes it fails to execute twice in a row for example.
Originally Posted by Davidelvig
IIs this truly a plain vanilla Teensy 3.2 running blink, with VUSB cut, and powered by 5v on Vin? Could you provide a wiring diagram? Is it 1 wire on Vin?
This is the power supply I used to the LM7805 input.
Thanks Paul, I also rigged up an experiment last night using a second teensy to wait a random amount of time and turn on the first teensy and then monitor for the result. It logged thousands of passes and no fails. I will come back to this and make a video soon, thanks for taking the time to try it on your end Paul.
I can confirm I've also seen a similar problem.
In my case, the teensy 3.1 was mounted on a PCB, with 3.3V fed from a linear regulator (ST117 iirc) in turn fed from 5V from a MC34063 switching regulator, down from 12V DC. This came into the board via a typical 2A off the shelf AC/DC converter.
I had about 10 units built identically; some seemed to exhibit the problem more often than others.
I couldn't find any problems with rise times etc that I expected to see based on the behaviour. I did play with switching regulator frequencies, adding series impedance, more / less decoupling. Just couldn't correlate anything.
Eventually I found a different AC/DC converter which seemed to reduce the occurrence down to ~ 1/100, which was acceptable for my application.
Okay I made a little video of the problem happening. It happens on a cold start (after being off for minutes to hours), but the easiest way to demonstrate it on camera seems to be a quick power cycle.
I'll also another observation: I couldn't reproduce the problem when unplugging/plugging the +5V supply into the breadboard (banana conn), only using the power supply switch itself would cause the teensy to not execute.
Last edited by gatheround; 09-12-2020 at 10:16 PM.
It is a Mastech HY1803. I'm also able to get the problem when switching on my project power supply (LM317 +15V into the L78L05) which also has a mechanical switch before the LM317. I did notice that when the Teensys don't run, the crystals aren't oscillating - if that's any help.
I'm also able to get the problem when switching on my project power supply (LM317 +15V into the L78L05) which also has a mechanical switch before the LM317.
Could you give me some more detail about this circuitry? Maybe photos too? Any chance you could try with a LM317 and regular LM7805?
If the problem only happens with L78L05, can you give me the exact part number at Digikey, so I can buy the exact same part you're using?
I'll try to build it here and test again. But I'd really like to make sure I get all the details, like the capacitors and any other parts, as close as possible to what you're using so I have the best chance of reproducing the problem.