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

Thread: Teensy 4.1 trouble getting started

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Location
    West coast USA (on fire)
    Posts
    3

    Teensy 4.1 trouble getting started

    Turns out I cant even get the simplest LED program to run. A career in embedded systems and software development didnt help me.

    Left the pin at 13 for the teensy 4.1. Here is the versions and sample code.

    Arduino 1.8.13
    Teensyduino 1.53
    Windows 10 platform

    I bought a USB cable with the teensy so that I would have all the right pins. I am using a motherboard USB port and not a powered USB hub, not sure if that matters.

    When I first hooked up the teensy 4.1, the LED was blinking. Then I tried to download and run the LED program. No blinking...

    I have read thru the troubleshooting pages and didn't find any solutions.

    Steve

    LED Code:

    /*
    Blink
    Turns on an LED on for one second, then off for one second, repeatedly.

    This example code is in the public domain.
    */

    // Pin 13 has an LED connected on most Arduino boards.
    // Pin 11 has the LED on Teensy 2.0
    // Pin 6 has the LED on Teensy++ 2.0
    // Pin 13 has the LED on Teensy 3.0
    // give it a name:
    int led = 13;

    // the setup routine runs once when you press reset:
    void setup() {
    // initialize the digital pin as an output.
    pinMode(led, OUTPUT);
    }

    // the loop routine runs over and over again forever:
    void loop() {
    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
    delay(1000); // wait for a second
    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
    delay(1000); // wait for a second
    }

    Messages:

    Here is the verbose output.
    11:38:52.672 (ports 5): Begin, version=1.53, high-res time
    11:38:52.672 (ports 5): LoadLibrary cfgmgr32 ok
    11:38:52.672 (ports 5): LoadLibrary ntdll ok
    11:38:52.676 (ports 5): callback 0024
    11:38:52.676 (ports 5): callback 0081
    11:38:52.677 (ports 5): callback 0083
    11:38:52.677 (ports 5): hWnd = 525898
    11:38:52.681 (ports 5): nothing new, skipping HID & Ports enum
    11:44:24.581 (post_compile 1): Begin, version=1.53, high-res time
    11:44:26.806 (loader): Teensy Loader 1.53, begin program
    11:44:26.868 (loader): Listening for remote control on port 3149
    11:44:26.869 (loader): initialized, showing main window
    11:44:26.943 (loader): remote connection 1380 opened
    11:44:26.944 (loader): remote cmd from 1380: "comment: Teensyduino 1.53 - WINDOWS (teensy_post_compile)"
    11:44:26.944 (loader): remote cmd from 1380: "status"
    11:44:26.944 (post_compile 1): Sending command: comment: Teensyduino 1.53 - WINDOWS (teensy_post_compile)
    11:44:26.947 (loader): HID/win32: vid:045E pid:00DB ver:0173
    11:44:26.948 (post_compile 1): Status: 0, 0, 0, 0, 0, 0, C:\Users\Steve\AppData\Local\Temp\arduino_build_77 4481\, Blink.ino.hex
    11:44:26.948 (post_compile 1): Sending command: dir:C:\Users\Steve\AppData\Local\Temp\arduino_buil d_251115\
    11:44:26.948 (loader): remote cmd from 1380: "dir:C:\Users\Steve\AppData\Local\Temp\arduino_bui ld_251115\"
    11:44:26.948 (loader): remote cmd from 1380: "file:Blink.ino.hex"
    11:44:26.948 (post_compile 1): Sending command: file:Blink.ino.hex
    11:44:26.957 (loader): File "Blink.ino.hex". 13380 bytes, 0% used
    11:44:26.962 (loader): remote cmd from 1380: "status"
    11:44:26.964 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, C:\Users\Steve\AppData\Local\Temp\arduino_build_25 1115\, Blink.ino.hex
    11:44:26.964 (post_compile 1): Sending command: auton
    11:44:26.964 (loader): remote cmd from 1380: "auton"
    11:44:26.965 (post_compile 1): Disconnect
    11:44:26.988 (loader): remote connection 1380 closed
    11:44:27.077 (post_compile 2): Begin, version=1.53, high-res time
    11:44:27.078 (loader): remote connection 1432 opened
    11:44:27.078 (loader): remote cmd from 1432: "comment: Teensyduino 1.53 - WINDOWS (teensy_post_compile)"
    11:44:27.078 (loader): remote cmd from 1432: "status"
    11:44:27.078 (post_compile 2): Sending command: comment: Teensyduino 1.53 - WINDOWS (teensy_post_compile)
    11:44:27.079 (loader): remote cmd from 1432: "dir:C:\Users\Steve\AppData\Local\Temp\arduino_bui ld_251115\"
    11:44:27.079 (loader): remote cmd from 1432: "file:Blink.ino.hex"
    11:44:27.079 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, C:\Users\Steve\AppData\Local\Temp\arduino_build_25 1115\, Blink.ino.hex
    11:44:27.079 (post_compile 2): Sending command: dir:C:\Users\Steve\AppData\Local\Temp\arduino_buil d_251115\
    11:44:27.079 (post_compile 2): Sending command: file:Blink.ino.hex
    11:44:27.088 (loader): File "Blink.ino.hex". 13380 bytes, 0% used
    11:44:27.093 (loader): remote cmd from 1432: "status"
    11:44:27.094 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, C:\Users\Steve\AppData\Local\Temp\arduino_build_25 1115\, Blink.ino.hex
    11:44:27.094 (post_compile 2): Disconnect
    11:44:27.114 (loader): remote connection 1432 closed
    11:44:27.115 (post_compile 3): Running teensy_reboot: "C:\Program Files (x86)\Arduino\hardware\teensy\..\tools\teensy_rebo ot.exe" teensy_reboot.exe "-board=TEENSY41" "-port=COM1" "-portlabel=COM1" "-portprotocol=serial"
    11:44:27.115 (loader): remote connection 1432 opened
    11:44:27.180 (reboot 4): Begin, version=1.53, high-res time
    11:44:27.180 (reboot 4): location = COM1
    11:44:27.180 (reboot 4): portlabel = COM1
    11:44:27.180 (reboot 4): portprotocol = serial
    11:44:27.180 (reboot 4): Serial device COM1 will be tried first
    11:44:27.180 (reboot 4): LoadLibrary cfgmgr32 ok
    11:44:27.180 (reboot 4): LoadLibrary ntdll ok
    11:44:27.182 (reboot 4): nothing new, skipping HID & Ports enum
    11:44:27.183 (loader): remote connection 1456 opened
    11:44:27.184 (reboot 4): Disconnect
    11:44:27.207 (loader): remote connection 1456 closed
    11:44:27.208 (loader): remote connection 1432 closed
    11:44:50.744 (loader): Verbose Info event
    11:49:15.963 (ports 5): WM_DEVICECHANGE DBT_DEVICEARRIVAL
    11:49:15.966 (loader): remote connection 1712 opened
    11:49:15.979 (ports 5): found_usb_device, id=\\?\usb#vid_16c0&pid_0478#000c28d8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    11:49:15.979 (ports 5): found_usb_device, loc=usb:0/1D0000/0/1/5 Port_#0005.Hub_#0010
    11:49:15.979 (ports 5): found_usb_device, hwid=USB\VID_16C0&PID_0478&REV_0105
    11:49:15.979 (ports 5): found_usb_device, devinst=00000005
    11:49:15.979 (ports 5): add: loc=usb:0/1D0000/0/1/5, class=HID, vid=16C0, pid=0478, ver=0105, serial=000c28d8, dev=\\?\usb#vid_16c0&pid_0478#000c28d8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    11:49:15.979 (ports 5): hiddev_from_devinst_list: iface=0
    11:49:15.980 (ports 5): found_usb_device complete
    11:49:15.980 (ports 5): hid, found devinst=0000000A
    11:49:15.980 (ports 5): hid, path=\\?\hid#vid_16c0&pid_0478#8&1f7c6fd9&0&0000#{ 4d1e55b2-f16f-11cf-88cb-001111000030}
    11:49:15.980 (ports 5): hid, opened handle
    11:49:15.980 (ports 5): devinst=0000000A, location=usb:0/1D0000/0/1/5
    11:49:15.980 (ports 5): vid=16C0, pid=0478, ver=0105, usepage=FF9C, use=0025
    11:49:15.980 (ports 5): devpath=\\?\hid#vid_16c0&pid_0478#8&1f7c6fd9&0&000 0#{4d1e55b2-f16f-11cf-88cb-001111000030}
    11:49:15.980 (ports 5): usb_add: usb:0/1D0000/0/1/5 hid#vid_16c0&pid_0478 (Teensy 4.1) Bootloader
    11:49:16.098 (loader): Device came online, code_size = 8126464
    11:49:16.105 (loader): Board is: Teensy 4.1 (IMXRT1062), version 1.05
    11:49:16.120 (loader): File "Blink.ino.hex". 13380 bytes, 0% used
    11:49:16.125 (loader): set background IMG_ONLINE
    11:49:16.141 (loader): File "Blink.ino.hex". 13380 bytes, 0% used
    11:49:16.146 (loader): elf appears to be for Teensy 4.1 (IMXRT1062) (8126464 bytes)
    11:49:16.151 (loader): elf binary data matches hex file
    11:49:16.156 (loader): elf file is for Teensy 4.1 (IMXRT1062)
    11:49:16.162 (loader): begin operation
    11:49:16.178 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    11:49:16.178 (ports 5): nothing new, skipping HID & Ports enum
    11:49:16.208 (loader): flash, block=0, bs=1024, auto=1
    11:49:16.213 (loader): gauge old value = 0
    11:49:16.218 (loader): flash, block=1, bs=1024, auto=1
    11:49:16.403 (loader): gauge old value = 1
    11:49:16.408 (loader): flash, block=2, bs=1024, auto=1
    11:49:16.413 (loader): gauge old value = 2
    11:49:16.419 (loader): flash, block=3, bs=1024, auto=1
    11:49:16.426 (loader): gauge old value = 3
    11:49:16.432 (loader): flash, block=4, bs=1024, auto=1
    11:49:16.438 (loader): gauge old value = 4
    11:49:16.447 (loader): flash, block=5, bs=1024, auto=1
    11:49:16.452 (loader): gauge old value = 5
    11:49:16.459 (loader): flash, block=6, bs=1024, auto=1
    11:49:16.459 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    11:49:16.459 (ports 5): nothing new, skipping HID & Ports enum
    11:49:16.464 (loader): gauge old value = 6
    11:49:16.484 (loader): flash, block=7, bs=1024, auto=1
    11:49:16.495 (loader): gauge old value = 7
    11:49:16.500 (loader): flash, block=8, bs=1024, auto=1
    11:49:16.507 (loader): gauge old value = 8
    11:49:16.513 (loader): flash, block=9, bs=1024, auto=1
    11:49:16.517 (loader): gauge old value = 9
    11:49:16.523 (loader): flash, block=10, bs=1024, auto=1
    11:49:16.528 (loader): gauge old value = 10
    11:49:16.533 (loader): flash, block=11, bs=1024, auto=1
    11:49:16.537 (loader): gauge old value = 11
    11:49:16.544 (loader): flash, block=12, bs=1024, auto=1
    11:49:16.549 (loader): gauge old value = 12
    11:49:16.558 (loader): flash, block=13, bs=1024, auto=1
    11:49:16.562 (loader): gauge old value = 13
    11:49:16.574 (loader): sending reboot
    11:49:16.579 (loader): begin wait_until_offline
    11:49:16.618 (ports 5): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
    11:49:16.619 (ports 5): remove: loc=usb:0/1D0000/0/1/5
    11:49:16.619 (ports 5): usb_remove: usb:0/1D0000/0/1/5
    11:49:16.619 (ports 5): nothing new, skipping HID & Ports enum
    11:49:16.636 (loader): offline, waited 1
    11:49:16.656 (loader): end operation, total time = 0.488 seconds
    11:49:16.671 (loader): set background IMG_REBOOT_OK
    11:49:16.693 (loader): redraw timer set, image 14 to show for 1200 ms
    11:49:16.734 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    11:49:16.735 (ports 5): nothing new, skipping HID & Ports enum
    11:49:16.796 (loader): HID/win32: vid:045E pid:00DB ver:0173
    11:49:17.893 (loader): redraw, image 9
    11:49:18.269 (ports 5): purge, name=hid#vid_16c0&pid_0478 (Teensy 4.1) Bootloader, loc=usb:0/1D0000/0/1/5, age=1.650 sec

  2. #2
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,574
    Make sure your USB cable is not just a "charging cable". see https://www.pjrc.com/teensy/troubleshoot.html

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,460
    Also note: when a teensy ships the code is setup that it does not have USB type of serial, so will not respond to Serial reboots..

    So for new boards, I will typically use a simple blink program. Use the Arduino blink program,

    Then click the verify button, which should then compile and load up the teensy program...

    Then I press the program button on the Teensy. It should hopefully see the teensy show it program the chip, and then a new Serial port should be assigned by windows to the board... (Hopefully)

  4. #4
    Junior Member
    Join Date
    Sep 2020
    Location
    West coast USA (on fire)
    Posts
    3
    Quote Originally Posted by manitou View Post
    Make sure your USB cable is not just a "charging cable". see https://www.pjrc.com/teensy/troubleshoot.html
    Yeah, see above, I bought the cable with the teensy because I read about this problem.

    Thanks,

    Steve

  5. #5
    Junior Member
    Join Date
    Sep 2020
    Location
    West coast USA (on fire)
    Posts
    3
    Quote Originally Posted by KurtE View Post
    Also note: when a teensy ships the code is setup that it does not have USB type of serial, so will not respond to Serial reboots..

    So for new boards, I will typically use a simple blink program. Use the Arduino blink program,

    Then click the verify button, which should then compile and load up the teensy program...

    Then I press the program button on the Teensy. It should hopefully see the teensy show it program the chip, and then a new Serial port should be assigned by windows to the board... (Hopefully)

    OK, I will try this today. Thanks for the help.

    Steve

Posting Permissions

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