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

Thread: Teensy 3.5 - Button Program only and NO Serial out until DUAL then SerialUSB1 OK

  1. #1
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,358

    Teensy 3.5 - Button Program only and NO Serial out until DUAL then SerialUSB1 OK

    Pulled out a T_3.5 - used quite a bit in past for past testing - not used in Months++
    - Once cut VIN<>VUSB - now soldered again
    - Top side Female headers in place
    - No problems when last used

    >> This is Win 11 with TD 1.57

    Normal Single USB SERIAL:
    TyCommander sees it come online - as does Windows with CHIME IN and CHIME OUT when unplugged.
    Can be reprogrammed with Button only
    Program appears to run

    Tested with NEW unwrapped T_3.5 and all is well using same code: Single or DUAL Serial

    Build with DUAL Serial:
    > SerialUSB1: works
    > Serial: now works as expected?
    > Software build and Teensy Upload works without Button?
    > repeat upload works

    Rebuild USB Serial and if prior Dual Serial it will upload, once programmed as USB Serial only - it fails.
    > and Serial Print does not appear
    > Teensy Loader only sees device after Button

    Test code to have uploaded with Button by putting 3.3V on pin #33 and the Teensy will restart

    Code to see SerialUSB1 when built DUAL Serial all is well?
    Code:
    void ResetInterrupt() {
      SCB_AIRCR = 0x5FA0004;
      while (true);
    }
    
    elapsedMillis noDelay;
    void setup() {
      Serial.begin(115200);
      while (!Serial && millis() < 10000 );
      Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    #if defined(USB_DUAL_SERIAL)
      SerialUSB1.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    #endif
      if (CrashReport) Serial.print(CrashReport);
      pinMode(13, OUTPUT);
    
    // like this - pick a pin 33 or other ... pulldown/rising or pullup/falling
      pinMode(33, INPUT_PULLDOWN);
      attachInterrupt(33, ResetInterrupt, RISING);
      //NVIC_SET_PRIORITY(IRQ_GPIO6789, 0);
    }
    
    void loop() {
      if ( noDelay > 1000 ) {
        noDelay -= 1000;
        digitalToggle( LED_BUILTIN );
      }
    }

    > IIRC - somebody noted a T_3.2 not working right when Serial used? Didn't read to see if related.

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,949
    @defragster,

    I am not sure I understand. Probably I have not had enough coffee yet

    With this are you doing this with TyCommander? and/or are you doing it with the Serial Monitor stuff of Teensyduino?

    If you are using TyCommander, are you building within Arduino 1.8.19 or are you building within Sublime text? If Sublime text are you using it to try to program or are you using
    TyCommander to do the programming?

    I know at times TyCommander had some issues with going from Dual or Tripple back to SIngle, that it left a phantom entry for the previous dual and Serial, with some indication like missing...

    I don't think I have any unused T3.5s, although maybe in my spare box... I know I have at least one unused T3.6.
    Not sure why the unused would matter other than maybe that Windows had to create a new Com port for it?

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,949
    Note: With T3.6 you do run into issues of having to hit the program button at times. I tried it with IDE2...
    But did not lose output.

    The interesting thing is, that if you start from a fresh Teensy, when I programmed it first with Dual Serial, it assigned Com ports: 16 and 17 to it.
    Then when I reprogrammed it, it then assigned Com Port 18 to it. So to see the data, the Terminal monitor needs to look at a different Com:

    But with IDE1 1,8.19 using Serial Monitor it was happier. Although at that point, no longer a clean unused fresh Teensy

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,358
    Also - OLD_T_3.5 is ignoring the 15 second Restore as that was timed and tried about 6 times. with timer at 14,15,16 seconds.

    It seems 'something failed' on OLD_T_3.5 - except it worked when I went to DUAL Serial, so not a total loss - and no 15s Restore to Blink.

    TyCommander is Sermon only - All uploads from Teensy Loader - but no Serial Output ever shows in TyComm - until selecting Dual Serial.

    Using IDE Teensy Ports Com 6 same results. IDE SerMon shows as if 'online' - but gets no USB Serial. And requires Button to upload.

    Switch to New_T_3.5 and it works as expected.

    Posted loop() altered to add print on blink:
    Code:
    void loop() {
      if ( noDelay > 1000 ) {
        noDelay -= 1000;
        digitalToggle( LED_BUILTIN );
        Serial.println( micros() );
    #if defined(USB_DUAL_SERIAL)
        SerialUSB1.println( micros() );
    #endif
      }
    }
    Change to Dual Serial:
    > New_T_3.5 works as expected.

    Return to OLD_T_3.5 to build w/Dual Serial:
    > IDE T_Port sees the T_3.5 arrive and changes PORT
    > Upload fail:
    Teensy did not respond to a USB-based request to enter program mode.
    Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
    > Press Button, Uploads
    > OLD_T_3.5 now working fine?

    Except for failure of the 15s Restore, all seems fine when Dual Serial is programmed ???

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,358
    Fun Update - On the porch with Win 10 Laptop that probably hasn't seen the old T_3.5

    OLD_T_3.5 seems to work NORMALLY here

    Tried three 15s Restores - finally wiped the code - but not running factory Blink

    Next attempt again - after upload - just left prior code running

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,787
    Quote Originally Posted by defragster View Post
    Tried three 15s Restores - finally wiped the code - but not running factory Blink
    This is expected behavior. The 15 sec button press only wipes the flash memory on Teensy 3.5 & 3.6.

    Teensy 4.0 & 4.1 added the "restore program" which is written into the flash after fully erase. But the older Teensy 3 boards don't have a known-good restore program permanently stored anywhere. That feature began with Teensy 4.0.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,358
    Quote Originally Posted by PaulStoffregen View Post
    This is expected behavior. The 15 sec button press only wipes the flash memory on Teensy 3.5 & 3.6.

    Teensy 4.0 & 4.1 added the "restore program" which is written into the flash after fully erase. But the older Teensy 3 boards don't have a known-good restore program permanently stored anywhere. That feature began with Teensy 4.0.
    Opps - too long since then. Thanks for detail reminder

    Suppose 15s Wipe was working - but prior times Loader was open with code to reinstall

    Still have to go back to Win 11 and see if it can get cleared to work there

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,358
    WORKING - back on Windows 11!

    Now Com18 instead of COM6.

    Found a BLUETOOTH ??? device also on COM6

    Device Mgr remove of the Com6 devices didn't do it.

    Used RegEdit to search "COM6" ignored Bluetooth ... searched until entry with what looked like T_3.5 Serial # and PJRC VID_PID showed up and deleted that entry.

    Plugged in the T_3.5 running the single USB Serial and it is showing sketch output ( in TyComm ).

    This machine was New Feb 2021 - it must have seen this Teensy sometime after that? - not sure what Bluetooth also got tagged as COM6?

    Oddest Teensy issue seen here. Device connected but no using USB Serial driver as needed - was Button programmable.

    REMINDER Lesson (re)Learned: T_3.5 and T_3.6 introduced the 15 second Button press Reset concept that reset MCU to needed spec and wiped FLASH. Not until T_4.0 and T_4.1 did the 15 second Button press Restore a working PJRC Blink sketch.
    > and if the loader is Active with Valid HEX on 15 Sec Button release - it will reprogram with that sketch and restart, unlike the T_4.x that Restores Blink and exits with it running IIRC.

    Glad the thought and option for Dual Serial came to mind as that appears as unique device and Windows gives it New Com#'s

Posting Permissions

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