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

Thread: Getting a Teensy 4.1 to work ...

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    6

    Getting a Teensy 4.1 to work ...

    Good afternooon.

    I have used Teensy 3.2s for more than 2 years, and have four or five of them involved in quite a large MIDI project. They work well.
    However, I recently purchased a Teensy 4.1 as I need more pins.

    Unfortunately I cannot get the Teensy 4.1 working at all. It is recognised by Windows as soon a USB plug is connected, and immediately runs the installed "Blink" program. However, uploading any program (including those which run properly with the 3.2) fails.

    As you expect code, I have returned to the simplest program I know:
    [CODE]
    void setup()
    {
    Serial.begin (9600);
    // Nothing much to set up!
    }

    void loop()
    {
    Serial.println ("Teensy 4.1: Hello world!");
    delay (500);
    }
    /CODE]

    Of course this code uploads and works with any of my Teensy3.2s, But it will not upload to the 4.1.

    The IDE offers the message:
    "Sketch uses 12780 bytes (4%) of program storage space. Maximum is 262144 bytes.
    Global variables use 6000 bytes (9%) of dynamic memory, leaving 59536 bytes for local variables. Maximum is 65536 bytes.
    C:\Program Files (x86)\Arduino\hardware\teensy/../tools/teensy_post_compile -file=Test_sketch.ino -path=K:\...\Arduino\HEX -tools=C:\Program Files (x86)\Arduino\hardware\teensy/../tools -board=TEENSY31 -reboot -port=COM1 -portlabel=COM1 -portprotocol=serial
    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
    ".

    Pressing the Program Mode button on the 4.1 has no effect, except to stop the Blink program, and flash a red LED by the USB socket. After removing & reinserting the USB plug, the Blink program resumes.

    So what am I missing?
    I am using v 1.8.9 of the IDE. Do I need a different version of the Teensyduino addin? (I cannot find out how to identify the version of Teesnyduino in use). I note that the Teensy 4.1 does not appear on the Boards Menu.

    Thanks in advance

    Kenneth Spencer

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,441
    I assume you have a version of Teensyduino supporting T4.1 You need to choose the Teensy 4.1 as the current board type.

    Your above compile is showing that you built to Teensy 3.2(3.1) not 4.1
    Code:
    The IDE offers the message:
    "Sketch uses 12780 bytes (4%) of program storage space. Maximum is 262144 bytes.
    Global variables use 6000 bytes (9%) of dynamic memory, leaving 59536 bytes for local variables. Maximum is 65536 bytes.
    C:\Program Files (x86)\Arduino\hardware\teensy/../tools/teensy_post_compile -file=Test_sketch.ino -path=K:\...\Arduino\HEX -tools=C:\Program Files (x86)\Arduino\hardware\teensy/../tools -board=TEENSY31 -reboot -port=COM1 -portlabel=COM1 -portprotocol=serial
    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".
    Edit as you can see that I marked in RED

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,497
    Quote Originally Posted by kaspencer View Post
    C:\Program Files (x86)\Arduino\hardware\teensy/../tools/teensy_post_compile -file=Test_sketch.ino -path=K:\...\Arduino\HEX -tools=C:\Program Files (x86)\Arduino\hardware\teensy/../tools -board=TEENSY31 -reboot -port=COM1 -portlabel=COM1 -portprotocol=serial
    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[/I]".
    You need to select Teensy 4.1 in Arduino's Tools > Boards menu.

    Teensy Loader is supposed to show you this error message when the code is built for the wrong board.

    Click image for larger version. 

Name:	sc.png 
Views:	10 
Size:	33.6 KB 
ID:	21300

    I'd really like to understand why you're not seeing this error message. Any chance you have a multiple monitor setup and the error is on another screen? Or maybe it's hidden below other windows? Or remaining minimized for some reason?

  4. #4
    Junior Member
    Join Date
    Jul 2020
    Posts
    6
    Thanks for the prompt replies, both Paul & Kurt.

    I'm pleased to say it is now working.

    I sort-of suspected that it was to do with the version of Teensyduino that I was using, as I did not have the Teensy4.1 in the Boards list.
    It didn't occur to me straight away though, because when I read about using the 4.1 RTC, and the recommendation in another post that the best clock program to run on the 4.1 was one written for the Teesny 3, I thought it should also be compiled using the Teensy 3 board selection, and hence didn't worry about the absence of the 4.1 in the list. That is also why, Paul, I didn't see the message you expected.

    Anyway an update of Teensyduino did the trick.

    Thanks again,

    Kenneth Spencer

Posting Permissions

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