Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 16 of 16

Thread: Teensy 3.2 won't boot & run w/o USB (FAQ I know, but delay isn't working)

  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    17

    Teensy 3.2 won't boot & run w/o USB (FAQ I know, but delay isn't working)

    Ok, I know this is a common complaint... I did a forum search first. It seems like the standard answer is to add a delay in setup but I've added up to 10 seconds and it's still not working.

    Arduino 1.8.13
    Teensyduino 1.53
    Teensy 3.2 board

    I'm also using Tall Dog's Teensy 3.2 Breakout (Revision D)
    https://www.tindie.com/products/logl...ut-revision-d/
    Hence I've cut the trace to separate VIN from VUSB on the underside of the Teensy.

    I can program and run code just fine w/ USB connected. In fact, once it's running I can disconnect the USB and it continues to run fine w/ the external 3.3V power. But if I leave the USB disconnected, and cycle power, it doesn't boot/run.

    To eliminate my code as being a factor I've tested this with basic "blink" example code.

    From my forum searching, it seems most people are told to solve this (and succeed) by adding a delay into setup. The recommended length was 4 seconds, but I've bumped it to as high as 10 seconds and it's still not working (this is still just using "blink" code).

    I'm not familiar enough with all this to know what else it could be or what to try next, so I'm afraid I must appeal for help here.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,922
    A lot of times, people have code like:

    Code:
    void setup (void)
    {
       // ...
    
       Serial.begin (9600);
       while (!Serial)
          ;
    
       // ...
    }
    The idea is to wait for the USB serial stuff to be setup, so you can do Serial.print. If you don't have the while loop, often the first few print statements go missing.

    However, this means it will loop forever if you aren't powering the Teensy via USB. Instead use something like:

    Code:
    void setup (void)
    {
       // ...
    
       Serial.begin (9600);
       delay (1000UL);                              // wait 1 second for devices to start up
    
       // Wait for at most 3 seconds for the USB serial connection to come up
       while (!Serial && (millis () <= 3000UL))
          ;
    
       // ...
    }

  3. #3
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Well, I tried your suggestion. It still won't run on cold boot w/o USB. To ensure there's no ambiguity, here's the code I'm using to test:

    Code:
    int led = 13;
    
    void setup() {
      Serial.begin(9600);
      delay (1000UL);
      while (!Serial && (millis () <= 3000UL))
          ;
    
      pinMode(led, OUTPUT);
    }
    
    void loop() {
      digitalWrite(led, HIGH);
      delay(1000);            
      digitalWrite(led, LOW);
      delay(1000);        
    }

  4. #4
    Senior Member
    Join Date
    Dec 2013
    Location
    East Stroudsburg PA.
    Posts
    300
    I can program and run code just fine w/ USB connected. In fact, once it's running I can disconnect the USB and it continues to run fine w/ the external 3.3V power. But if I leave the USB disconnected, and cycle power, it doesn't boot/run.
    Sounds like you are powering the Teensy 3.2 with two power source at the same time. You need to separate VIN from VUSB if using external power supply at the same time.
    Click image for larger version. 

Name:	T3.2 POWER.jpg 
Views:	8 
Size:	256.7 KB 
ID:	22711

  5. #5
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Quote Originally Posted by Chris O. View Post
    Sounds like you are powering the Teensy 3.2 with two power source at the same time. You need to separate VIN from VUSB if using external power supply at the same time.
    Nope, I did cut that trace (see my comment in the first post) and confirmed w/ a multimeter across the 2 pads.

    Also, if I disconnect external power but leave the USB connected, the Teensy stops running. So it's not getting its power from the USB.

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,143
    That seems odd - haven't run on 3.3V power alone like that - when I cut trace it was with 5V on VIN.

    Just wondering if the Serial line is commented in code?
    Code:
    int led = 13;
    
    void setup() {
    //  Serial.begin(9600);  // this line is a call and return with no action.
      delay (1000UL);
    //  while (!Serial && (millis () <= 3000UL))
          ;
    
      pinMode(led, OUTPUT);
    }
    
    void loop() {
      digitalWrite(led, HIGH);
      delay(1000);            
      digitalWrite(led, LOW);
      delay(1000);        
    }
    Also - just FYI - with USB Serial active on computer the connection is usually done in <500ms with SerMon ready to connect - sometimes a bit longer ~700ms

    If that doesn't work perhaps the 3.3V applied isn't arriving properly to start as expected.

  7. #7
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Quote Originally Posted by defragster View Post
    That seems odd - haven't run on 3.3V power alone like that - when I cut trace it was with 5V on VIN.
    Well, the Teensy 3.2 runs on 3.3V not 5V so that's why I'm giving it 3.3V.

    Just wondering if the Serial line is commented in code?
    Nope, test code (which reproduces the problem) is as copy & pasted in my earlier post.

    If that doesn't work perhaps the 3.3V applied isn't arriving properly to start as expected.
    Not sure I understand this. The Teensy is "off" and isn't doing anything until the 3.3V arrives. So whenever it arrives would be fine as that is the starting point for the Teensy to do anything. But I'm using a Pololu voltage converter, if it matters for some reason.

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,143
    Quote Originally Posted by sremick View Post
    Well, the Teensy 3.2 runs on 3.3V not 5V so that's why I'm giving it 3.3V.
    ...
    Not sure I understand this. The Teensy is "off" and isn't doing anything until the 3.3V arrives. So whenever it arrives would be fine as that is the starting point for the Teensy to do anything. But I'm using a Pololu voltage converter, if it matters for some reason.
    The Teensy 3.2 MCU runs on 5V and has an onboard 3.3V generator and the design is built around that powered on VIN or VUSB. This issue hasn't come up much for the T_3.2, it has more so on the 3.6 and 3.5 - to some degree where the ramp up rate on the power can cause trouble. There is a post and reference by Paul on how the T_4.x was built and that more complex MCU is actively coordinated by the bootloader MCU and feeding from 3.3V can take active power on the vBat pin or a test pin on the PCB That doesn't apply to the T_3.2 of course - but does show design and expected use for that MCU.

    As noted not aware of posts on this WRT to T_3.2 ...

    <edit> : for similar ref details ( on T_4.x ) - this post : Teensy40-only-3-3V-power-supply

  9. #9
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,311
    Well, the Teensy 3.2 runs on 3.3V not 5V so that's why I'm giving it 3.3V.
    Yes, but the VIn pin goes to a on board voltage regulator which generates the 3.3V. I use external voltage supply all the time, as suggested by defragster I always supply 5V at VIn and never got any issues.

    Edit: sorry, cross post

  10. #10
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Quote Originally Posted by defragster View Post
    The Teensy 3.2 MCU runs on 5V and has an onboard 3.3V generator and the design is built around that powered on VIN or VUSB.
    Hmm... I was going by this:
    https://www.pjrc.com/teensy/techspecs.html

    For the 3.2, it says VIN is "5V tolerant" which translates to "the pins expects a 3.3V signal, but is designed to allow up to 5 volts." So I figured since it "expects a 3.3V signal", I'd give it what it expects. It sounds like you're saying this is not the case, and it's expecting more than 3.3V so that its built-in voltage converter can do work to drop it to 3.3V?

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,143
    The T_3.2 card is the bible it shows :: Vin ( 3.6 to 6.0 volts)

    The "5V Tolerant" is in the Digital I/O and Breadboard I/O section? That table doesn't have have entries for the VIN pins of the Teensy units - though it would be a good place for it since they vary somewhat.

  12. #12
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,143
    Also seeing this page : pjrc.com/teensy/teensy31.html { for T_3.2 also }

    It has more detail - but also no mention of VIN:
    Code:
    5 Volt Tolerance on Digital Inputs
    Today most new chips use 3.3V signals, but many legacy products output 5 volt digital signals. These can now be directly connected to Teensy digital inputs.
    All digital pins are 5 volt tolerant on Teensy 3.2 & 3.1. However, the analog-only pins (A10-A14), AREF, Program and Reset are 3.3V only.

  13. #13
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Ok, applying 5VDC to VIN seems to work fine, so we can consider this one closed. Was an issue of me interpreting the details about it wanting 3.3V in.

  14. #14
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,143
    Quote Originally Posted by sremick View Post
    Ok, applying 5VDC to VIN seems to work fine, so we can consider this one closed. Was an issue of me interpreting the details about it wanting 3.3V in.
    Great you have 5V handy and it is working.

    May have overstated about the "Card" is the bible ... but it is the 'stone tablets'

  15. #15
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,991
    Quote Originally Posted by sremick View Post
    Ok, applying 5VDC to VIN seems to work fine, so we can consider this one closed. Was an issue of me interpreting the details about it wanting 3.3V in.
    Even if you found a solution, a question: where did you apply 3.3V on Vin or on one of the pins that are labelled 3.3V?
    VIN expects around 5V, but if you have external 3.3V and are sure about it, you can bypass the on board LDO and provide power directly to one of the 3.3V pins.

  16. #16
    Junior Member
    Join Date
    Nov 2020
    Posts
    17
    Quote Originally Posted by WMXZ View Post
    Even if you found a solution, a question: where did you apply 3.3V on Vin or on one of the pins that are labelled 3.3V?
    VIN expects around 5V, but if you have external 3.3V and are sure about it, you can bypass the on board LDO and provide power directly to one of the 3.3V pins.
    I was apply 3.3V to the pin marked "3V3" mistakenly thinking it was 3.3V IN and not OUT (the card doesn't make that clear). It was enough to keep it running if I started w/ the USB connected and then unplugged the USB, but it wouldn't boot and run on its own w/o USB.

    I had left a 12V->5V converter on my breadboard along w/ the 3.3V one because I had been testing other components earlier that were 5V. So it was trivial to send 5V to the VIN pin on the Teensy instead. My e-paper display is 3.3V and I thought the Teensy was 3.3V all-around as well so I was figuring ultimately I'd just be using 3.3V but it's not a big deal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •