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

Thread: Teensy 4.0 USB Upload Problems or more

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    5

    Teensy 4.0 USB Upload Problems or more

    Hi,
    First post for me. I am having a problem uploading compiled code to the Teensy. The issue has occurred with two separate Teensys.

    The first Teensy would not accept any programs uploaded from the Arduino UI.
    The scenario with the first Teensy goes like this:
    1. Cut the Vin and VUSB jumper first.
    2. Install the Teensy into an adapter board made by TSW for insertion in an uBitx Amateur Radio transceiver
    3. Compile and download the TSW software to the Teensy via USB
    4. Software does not get installed because the USB port from the PC to the Teensy disappears from Windows
    5. Remove Teensy from adapter board
    6. Close the Vin to VUSB pads with a solder blob
    7. Connect Teensy to USB port and see that the PC does not recognize the Teensy
    8. Press the switch on the Teensy for 15 seconds and wait for the blink program to start
    9 When blink program is flashing the Teensy LED notice that the Arduino UI now 'sees' the Teensy USB port in the tools pulldown
    10. Try to load the 'blink' program from the Arduino's Teensy examples folder
    11. Repeat steps 7-10 until it's obvious nothing is going to be different.
    Arduino-Teensy USB link only in place until I try a compile/upload cycle, then connection disappears before code is passed to the Teensy

    OK, maybe my ESD proceedures were sloppy with the first Teensy, but having done this with uP's over a long period of time I doubt it.
    But you never can be sure it's not your fault so I order a 2nd Teensy

    2nd Teensy arrives..
    Repeat steps 1-3 above and Success! The software loaded. Ok must have been my fault somewhere along the line.
    Time passes....
    Multiple edit and compile steps are done with the now buttoned up transceiver and Teensy. Incremental development rules the day. Two weeks pass.
    One day the Arduino UI drops the USB port to the Teensy. Only connection to the Teensy through this time was through the USB port.
    Now the second Teensy is exhibiting the same behavior as the first Teensy!
    I pull the 2nd Teensy from the adapter board and repeate steps 6-11 above
    Same result, Arduino-Teensy USB link only in place until I try a compile/upload cycle, then connection disappears before code is passed to the Teensy
    So now I have two Teensys that do not work. In keeping with the definition of insanity, I ordered a third Teensy. I'm waiting for that one to arrive.
    To try and avoid a third failure I'm asking the group if this has happened to anyone else.

    Specifics:
    I tried three different development hosts:
    - 2 different Windows 10 Pro PC's
    - Mac Mini running Catalina

    Arduino V1.8.12 and loader v1.52
    Port in Win PC's was: PORT: "hid#vid_1bc0&pid_0486 RAW HID (Teensy 4.0)"
    Program used for loader log listing was "blink" from the Arduino Teensy folder as it was the smallest program I could find that illustrates the issue I'm having.

    Log from Loader:


    15:26:44.791 (ports 5): Begin, version=1.52, high-res time
    15:26:44.791 (ports 5): LoadLibrary cfgmgr32 ok
    15:26:44.791 (ports 5): LoadLibrary ntdll ok
    15:26:44.806 (ports 5): callback 0024
    15:26:44.806 (ports 5): callback 0081
    15:26:44.807 (ports 5): callback 0083
    15:26:44.808 (ports 5): hWnd = 1967144
    15:26:44.818 (ports 5): found_usb_device, id=\\?\usb#vid_16c0&pid_0486#7631110#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:26:44.818 (ports 5): found_usb_device, loc=usb:0/1A0000/0/1/4 Port_#0004.Hub_#0005
    15:26:44.818 (ports 5): found_usb_device, hwid=USB\VID_16C0&PID_0486&REV_0279
    15:26:44.818 (ports 5): found_usb_device, devinst=00000003
    15:26:44.819 (ports 5): add: loc=usb:0/1A0000/0/1/4, class=USB, vid=16C0, pid=0486, ver=0279, serial=7631110, dev=\\?\usb#vid_16c0&pid_0486#7631110#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:26:44.819 (ports 5): hiddev_from_devinst_list: iface=1
    15:26:44.819 (ports 5): 00000012: path=\\?\hid#vid_16c0&pid_0486&mi_01#8&62753a2&0&0 000#{4d1e55b2-f16f-11cf-88cb-001111000030}
    15:26:44.820 (ports 5): found_usb_device complete
    15:26:44.821 (ports 5): hid, found devinst=00000012
    15:26:44.821 (ports 5): hid, found devinst=00000010
    15:26:44.821 (ports 5): usb_add: usb:0/1A0000/0/1/4 hid#vid_16c0&pid_0486 (Teensy 4.0) RawHID
    15:28:48.496 (post_compile 1): Begin, version=1.52, high-res time
    15:28:49.072 (loader): Teensy Loader 1.52, begin program
    15:28:49.281 (loader): Listening for remote control on port 3149
    15:28:49.282 (loader): initialized, showing main window
    15:28:49.363 (loader): remote connection 1360 opened
    15:28:49.364 (post_compile 1): Sending command: comment: Teensyduino 1.52 - WINDOWS (teensy_post_compile)
    15:28:49.364 (loader): remote cmd from 1360: "comment: Teensyduino 1.52 - WINDOWS (teensy_post_compile)"
    15:28:49.364 (loader): remote cmd from 1360: "status"
    15:28:49.371 (loader): HID/win32: vid:08BB pid:2904 ver:0100
    15:28:49.372 (loader): HID/win32: vid:040D pid:3417 ver:0011
    15:28:49.372 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.372 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.373 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.373 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.373 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.374 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:49.409 (loader): HID/win32: vid:16C0 pid:0486 ver:0279
    15:28:49.409 (loader): HID/win32: vid:16C0 pid:0486 ver:0279
    15:28:49.410 (loader): HID/win32: vid:051D pid:0002 ver:0090
    15:28:49.411 (post_compile 1): Status: 0, 0, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_13 991\, Blink.pde.hex
    15:28:49.411 (post_compile 1): Sending command: dir:C:\Users\offic\AppData\Local\Temp\arduino_buil d_271038\
    15:28:49.411 (loader): remote cmd from 1360: "dir:C:\Users\offic\AppData\Local\Temp\arduino_bui ld_271038\"
    15:28:49.411 (loader): remote cmd from 1360: "file:Blink.pde.hex"
    15:28:49.412 (post_compile 1): Sending command: file:Blink.pde.hex
    15:28:49.428 (loader): File "Blink.pde.hex". 13540 bytes, 1% used
    15:28:49.437 (loader): remote cmd from 1360: "status"
    15:28:49.440 (post_compile 1): Status: 1, 0, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.440 (post_compile 1): Sending command: auton
    15:28:49.441 (loader): remote cmd from 1360: "auton"
    15:28:49.441 (post_compile 1): Disconnect
    15:28:49.453 (loader): remote connection 1360 closed
    15:28:49.633 (post_compile 2): Begin, version=1.52, high-res time
    15:28:49.644 (loader): remote connection 1340 opened
    15:28:49.645 (post_compile 2): Sending command: comment: Teensyduino 1.52 - WINDOWS (teensy_post_compile)
    15:28:49.645 (loader): remote cmd from 1340: "comment: Teensyduino 1.52 - WINDOWS (teensy_post_compile)"
    15:28:49.645 (loader): remote cmd from 1340: "status"
    15:28:49.647 (loader): remote cmd from 1340: "dir:C:\Users\offic\AppData\Local\Temp\arduino_bui ld_271038\"
    15:28:49.647 (loader): remote cmd from 1340: "file:Blink.pde.hex"
    15:28:49.647 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.647 (post_compile 2): Sending command: dir:C:\Users\offic\AppData\Local\Temp\arduino_buil d_271038\
    15:28:49.647 (post_compile 2): Sending command: file:Blink.pde.hex
    15:28:49.657 (loader): File "Blink.pde.hex". 13540 bytes, 1% used
    15:28:49.666 (loader): remote cmd from 1340: "status"
    15:28:49.669 (post_compile 2): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.669 (post_compile 2): Disconnect
    15:28:49.680 (loader): remote connection 1340 closed
    15:28:49.680 (post_compile 3): Running teensy_reboot: "C:\Program Files (x86)\Arduino\hardware\teensy\..\tools\teensy_rebo ot.exe" teensy_reboot.exe "-board=TEENSY40" "-port=usb:0/1A0000/0/1/4" "-portlabel=[no_device] Bootloader" "-portprotocol=Teensy"
    15:28:49.681 (loader): remote connection 1340 opened
    15:28:49.725 (reboot 4): Begin, version=1.52, high-res time
    15:28:49.725 (reboot 4): location = usb:0/1A0000/0/1/4
    15:28:49.725 (reboot 4): portprotocol = Teensy
    15:28:49.725 (reboot 4): portlabel = [no_device] Bootloader
    15:28:49.725 (reboot 4): Only location usb:0/1A0000/0/1/4 will be tried
    15:28:49.725 (reboot 4): LoadLibrary cfgmgr32 ok
    15:28:49.725 (reboot 4): LoadLibrary ntdll ok
    15:28:49.730 (reboot 4): found_usb_device, id=\\?\usb#vid_16c0&pid_0486#7631110#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:28:49.730 (reboot 4): found_usb_device, loc=usb:0/1A0000/0/1/4 Port_#0004.Hub_#0005
    15:28:49.730 (reboot 4): found_usb_device, hwid=USB\VID_16C0&PID_0486&REV_0279
    15:28:49.730 (reboot 4): found_usb_device, devinst=00000003
    15:28:49.730 (reboot 4): add: loc=usb:0/1A0000/0/1/4, class=USB, vid=16C0, pid=0486, ver=0279, serial=7631110, dev=\\?\usb#vid_16c0&pid_0486#7631110#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:28:49.730 (reboot 4): hiddev_from_devinst_list: iface=1
    15:28:49.731 (reboot 4): 00000012: path=\\?\hid#vid_16c0&pid_0486&mi_01#8&62753a2&0&0 000#{4d1e55b2-f16f-11cf-88cb-001111000030}
    15:28:49.732 (reboot 4): found_usb_device complete
    15:28:49.732 (reboot 4): hid, found devinst=00000012
    15:28:49.732 (reboot 4): hid, found devinst=00000010
    15:28:49.744 (loader): remote connection 1424 opened
    15:28:49.744 (loader): remote cmd from 1424: "show:arduino_attempt_reboot"
    15:28:49.744 (loader): got request to show arduino rebooting message
    15:28:49.744 (reboot 4): found Teensy Loader, version 1.52
    15:28:49.744 (reboot 4): Sending command: show:arduino_attempt_reboot
    15:28:49.746 (loader): remote cmd from 1424: "comment: Teensyduino 1.52 - WINDOWS (teensy_reboot)"
    15:28:49.747 (reboot 4): Sending command: comment: Teensyduino 1.52 - WINDOWS (teensy_reboot)
    15:28:49.747 (loader): remote cmd from 1424: "status"
    15:28:49.749 (loader): remote cmd from 1424: "status"
    15:28:49.749 (reboot 4): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.749 (reboot 4): hid_send_feature
    15:28:49.752 (reboot 4): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.752 (reboot 4): status read, retry 0
    15:28:49.852 (loader): remote cmd from 1424: "status"
    15:28:49.855 (reboot 4): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.855 (reboot 4): status read, retry 1
    15:28:49.955 (loader): remote cmd from 1424: "status"
    15:28:49.958 (reboot 4): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:49.958 (reboot 4): status read, retry 2
    15:28:49.968 (ports 5): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
    15:28:49.974 (loader): remote connection 1448 opened
    15:28:49.978 (ports 5): remove: loc=usb:0/1A0000/0/1/4
    15:28:49.978 (ports 5): usb_remove: usb:0/1A0000/0/1/4
    15:28:49.978 (ports 5): nothing new, skipping HID & Ports enum
    15:28:50.058 (loader): remote cmd from 1424: "status"
    15:28:50.061 (reboot 4): Status: 1, 1, 0, 0, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:50.061 (reboot 4): status read, retry 3
    15:28:50.134 (ports 5): WM_DEVICECHANGE DBT_DEVICEARRIVAL
    15:28:50.135 (ports 5): found_usb_device, id=\\?\usb#vid_16c0&pid_0478#000ba4e7#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:28:50.135 (ports 5): found_usb_device, loc=usb:0/1A0000/0/1/4 Port_#0004.Hub_#0005
    15:28:50.135 (ports 5): found_usb_device, hwid=USB\VID_16C0&PID_0478&REV_0105
    15:28:50.135 (ports 5): found_usb_device, devinst=00000021
    15:28:50.135 (ports 5): add: loc=usb:0/1A0000/0/1/4, class=HID, vid=16C0, pid=0478, ver=0105, serial=000ba4e7, dev=\\?\usb#vid_16c0&pid_0478#000ba4e7#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    15:28:50.135 (ports 5): hiddev_from_devinst_list: iface=0
    15:28:50.136 (ports 5): found_usb_device complete
    15:28:50.136 (ports 5): usb_add: usb:0/1A0000/0/1/4 [no_device] (Teensy 4.0) Bootloader
    15:28:50.161 (loader): remote cmd from 1424: "status"
    15:28:50.163 (loader): Device came online, code_size = 2031616
    15:28:50.163 (loader): Board is: Teensy 4.0 (IMXRT1062), version 1.05
    15:28:50.173 (loader): File "Blink.pde.hex". 13540 bytes, 1% used
    15:28:50.180 (loader): set background IMG_ONLINE
    15:28:50.193 (loader): File "Blink.pde.hex". 13540 bytes, 1% used
    15:28:50.199 (loader): elf appears to be for Teensy 4.0 (IMXRT1062) (2031616 bytes)
    15:28:50.200 (loader): elf binary data matches hex file
    15:28:50.200 (loader): elf file is for Teensy 4.0 (IMXRT1062)
    15:28:50.204 (loader): begin operation
    15:28:50.214 (reboot 4): Status: 1, 1, 1, 1, 0, 1, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:50.219 (loader): flash, block=0, bs=1024, auto=1
    15:28:50.219 (loader): gauge old value = 0
    15:28:50.219 (loader): flash, block=1, bs=1024, auto=1
    15:28:50.369 (loader): gauge old value = 1
    15:28:50.369 (loader): remote cmd from 1424: "status"
    15:28:50.370 (loader): flash, block=2, bs=1024, auto=1
    15:28:50.370 (loader): gauge old value = 2
    15:28:50.371 (reboot 4): Status: 1, 1, 1, 1, 0, 1, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:50.371 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:28:50.371 (loader): flash, block=3, bs=1024, auto=1
    15:28:50.371 (loader): gauge old value = 3
    15:28:50.371 (loader): flash, block=4, bs=1024, auto=1
    15:28:50.371 (loader): gauge old value = 4
    15:28:50.372 (ports 5): update_usb_device, devinst list change, old had 1, new has 2
    15:28:50.372 (ports 5): hiddev_from_devinst_list: iface=0
    15:28:50.374 (ports 5): hid, found devinst=00000022
    15:28:50.374 (ports 5): hid, path=\\?\hid#vid_16c0&pid_0478#7&30320623&0&0000#{ 4d1e55b2-f16f-11cf-88cb-001111000030}
    15:28:50.374 (ports 5): hid, opened handle
    15:28:50.374 (ports 5): devinst=00000022, location=usb:0/1A0000/0/1/4
    15:28:50.374 (ports 5): vid=16C0, pid=0478, ver=0105, usepage=FF9C, use=0024
    15:28:50.374 (ports 5): devpath=\\?\hid#vid_16c0&pid_0478#7&30320623&0&000 0#{4d1e55b2-f16f-11cf-88cb-001111000030}
    15:28:50.374 (ports 5): usb_add: usb:0/1A0000/0/1/4 hid#vid_16c0&pid_0478 (Teensy 4.0) Bootloader
    15:28:50.375 (loader): flash, block=5, bs=1024, auto=1
    15:28:50.375 (loader): gauge old value = 5
    15:28:50.377 (loader): flash, block=6, bs=1024, auto=1
    15:28:50.377 (loader): gauge old value = 6
    15:28:50.379 (loader): flash, block=7, bs=1024, auto=1
    15:28:50.379 (loader): gauge old value = 7
    15:28:50.381 (loader): flash, block=8, bs=1024, auto=1
    15:28:50.381 (loader): gauge old value = 8
    15:28:50.383 (loader): flash, block=9, bs=1024, auto=1
    15:28:50.383 (loader): gauge old value = 9
    15:28:50.385 (loader): flash, block=10, bs=1024, auto=1
    15:28:50.385 (loader): gauge old value = 10
    15:28:50.386 (loader): flash, block=11, bs=1024, auto=1
    15:28:50.386 (loader): gauge old value = 11
    15:28:50.388 (loader): flash, block=12, bs=1024, auto=1
    15:28:50.388 (loader): gauge old value = 12
    15:28:50.389 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:28:50.390 (ports 5): nothing new, skipping HID & Ports enum
    15:28:50.390 (loader): flash, block=13, bs=1024, auto=1
    15:28:50.390 (loader): gauge old value = 13
    15:28:50.398 (loader): sending reboot
    15:28:50.398 (loader): begin wait_until_offline
    15:28:50.436 (ports 5): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
    15:28:50.437 (ports 5): remove: loc=usb:0/1A0000/0/1/4
    15:28:50.437 (ports 5): usb_remove: usb:0/1A0000/0/1/4
    15:28:50.437 (ports 5): nothing new, skipping HID & Ports enum
    15:28:50.449 (loader): offline, waited 1
    15:28:50.449 (loader): end operation, total time = 0.245 seconds
    15:28:50.450 (loader): set background IMG_REBOOT_OK
    15:28:50.452 (loader): redraw timer set, image 14 to show for 1200 ms
    15:28:50.452 (loader): remote cmd from 1424: "status"
    15:28:50.454 (loader): HID/win32: vid:08BB pid:2904 ver:0100
    15:28:50.454 (loader): HID/win32: vid:040D pid:3417 ver:0011
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:046D pid:C52B ver:2401
    15:28:50.454 (loader): HID/win32: vid:051D pid:0002 ver:0090
    15:28:50.456 (reboot 4): Status: 1, 1, 0, 1, 0, 0, C:\Users\offic\AppData\Local\Temp\arduino_build_27 1038\, Blink.pde.hex
    15:28:50.456 (reboot 4): status read, retry 4
    15:28:50.456 (reboot 4): Success
    15:28:50.456 (reboot 4): Disconnect
    15:28:50.463 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:28:50.464 (ports 5): nothing new, skipping HID & Ports enum
    15:28:50.471 (loader): remote connection 1424 closed
    15:28:50.474 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:28:50.474 (ports 5): nothing new, skipping HID & Ports enum
    15:28:50.478 (loader): remote connection 1340 closed
    15:28:51.658 (loader): redraw, image 9
    15:28:52.110 (ports 5): purge, name=hid#vid_16c0&pid_0478 (Teensy 4.0) Bootloader, loc=usb:0/1A0000/0/1/4, age=1.673 sec
    15:29:05.219 (loader): Verbose Info event
    ***This is where I pressed the button on the Teensy, Teensy is locked up at this point and the Teensy USB port has disappeared from the Port pulldown in
    the Arduino UI
    *****
    15:29:34.961 (ports 5): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
    15:29:34.962 (ports 5): nothing new, skipping HID & Ports enum
    15:29:35.042 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:29:35.043 (ports 5): nothing new, skipping HID & Ports enum
    15:29:35.070 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:29:35.070 (ports 5): nothing new, skipping HID & Ports enum
    15:29:35.097 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:29:35.097 (ports 5): WM_DEVICECHANGE DBT_DEVICEREMOVECOMPLETE
    15:29:35.097 (ports 5): nothing new, skipping HID & Ports enum
    15:29:36.738 (ports 5): WM_DEVICECHANGE DBT_DEVICEARRIVAL
    15:29:36.739 (ports 5): nothing new, skipping HID & Ports enum
    15:29:37.553 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:29:37.553 (ports 5): WM_DEVICECHANGE DBT_DEVICEARRIVAL
    15:29:37.554 (ports 5): nothing new, skipping HID & Ports enum
    15:29:37.589 (ports 5): WM_DEVICECHANGE DBT_DEVNODES_CHANGED
    15:29:37.590 (ports 5): nothing new, skipping HID & Ports enum

    Any help or pointer would be gratfully accepted.
    Thanks, Mike

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,082
    Very mysterious!

    Just to confirm I understand, the 15 second button press does always get you back to a point where the orange LED blinks and you computer detects Teensy as RawHID? And then Arduino can upload once, but the uploaded program fails?

    I know this is frustrating, but hopefully you can try a few more things?

    After uploading Blink, but no USB appears, is Teensy blinking? If you edit the blink program for 100ms, does the LED blink fast (confirming Teensy is running the uploaded code but unable to use USB), or is the LED still blinking slow, or not blinking at all? The idea is to distinguish whether Teensy is running the uploaded code and the problem might be on the PC side not detecting it, or maybe the code is running but USB isn’t working, for reasons as yet unknown...

    Could you try changing some settings before the upload? Try setting Tools > USB Type to RawHID and Tools > CPU Speed to 396 MHz. But leave the delay at 100, so the uploaded code blinks fast, so you can distinguish whether your Teensy is running the just-uploaded code or the copy the 15 sec restore wrote into the memory.

  3. #3
    Junior Member
    Join Date
    Jun 2020
    Posts
    5
    Quote Originally Posted by PaulStoffregen View Post
    Very mysterious!

    Just to confirm I understand, the 15 second button press does always get you back to a point where the orange LED blinks and you computer detects Teensy as RawHID? And then Arduino can upload once, but the uploaded program fails?

    I know this is frustrating, but hopefully you can try a few more things?

    After uploading Blink, but no USB appears, is Teensy blinking? If you edit the blink program for 100ms, does the LED blink fast (confirming Teensy is running the uploaded code but unable to use USB), or is the LED still blinking slow, or not blinking at all? The idea is to distinguish whether Teensy is running the uploaded code and the problem might be on the PC side not detecting it, or maybe the code is running but USB isnít working, for reasons as yet unknown...

    Could you try changing some settings before the upload? Try setting Tools > USB Type to RawHID and Tools > CPU Speed to 396 MHz. But leave the delay at 100, so the uploaded code blinks fast, so you can distinguish whether your Teensy is running the just-uploaded code or the copy the 15 sec restore wrote into the memory.
    ****
    Thanks for taking the time...

    - Yes, the 15 second button press aways brings me to the factory flashing program, and the Arduino IDE now see the USB connection to the Teensy
    - After the code is uploaded as the loader log shows, the Teensy is NOT blinking. No LED's are on.

    - and I have tried while scoping this issue out changing the delay in the blink program. Let's try your suggestions:
    - Set type to Raw, and speed to 396, and set sketch delays to 100
    - That sketck loaded and ran! - for about 35 seconds then stopped, repeated resets also ran for about 35 seconds before stopping

    I'll also note here that I've used multiple USB cables from the PC to the Teensy.

    Mike

  4. #4
    Junior Member
    Join Date
    Jun 2020
    Posts
    5
    oh, let me add that the factory reset continues to run after the 15 second reset where the uploaded blink sketch does not.

    Another data point - the second Teensy problem came about as I was trying to figure out why the RTC on the Teensey always reverted to the PC's current time vs. the time stored in the chip's RTC. I now know why by looking through the archives. I'm wondering if some conflict between the RTC, USB, and I2C is to blame somehow.

    That, of course does not explain what's happening to the blink sketch unless there was some kind of firmware corruption?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,082
    Quote Originally Posted by W1USN View Post
    - Set type to Raw, and speed to 396, and set sketch delays to 100
    - That sketck loaded and ran! - for about 35 seconds then stopped, repeated resets also ran for about 35 seconds before stopping
    Good, maybe making progress.

    Let's first look at whether power supply is a factor. Bootloader mode and the restore program use less power. So does your uploaded program when running at only 396 MHz rather than the default 600 MHz.

    Can you watch the 5V power line with a voltmeter? Best to observe thoughout this whole process of the 15 sec restore, uploading, then the code running for 35 seconds. If the USB cable is delivering good power, it should remain above 4.5V and whatever voltage it actually is should remain consistent. Change in 0.1V aren't a big deal, but it should not change by 0.5 to 1V or more.


    Quote Originally Posted by W1USN View Post
    I'm wondering if some conflict between the RTC, USB, and I2C is to blame somehow.
    I don't want to rule out anything, but if you're testing with the Teensy having no physical connection to anything other than the USB cable, I'm having a hard time imagining how those things could be conflicting.


    That, of course does not explain what's happening to the blink sketch unless there was some kind of firmware corruption?
    Firmware corruption would seem like a possibility. But having the 396 MHz code run for 35 seconds "feels" like a hardware problem, which is why my best guess at this point is power supply or delivery.

  6. #6
    Junior Member
    Join Date
    Jun 2020
    Posts
    5
    Thanks for the help.
    Teensy #1 has 5V on its 3.3V pin. Looks like that regulator is shot. This is the one I was testing with.
    So, throw out all of those tests
    Now to try Teensy #2

  7. #7
    Junior Member
    Join Date
    Jun 2020
    Posts
    5

    I think the problem is solved

    Quote Originally Posted by W1USN View Post
    Thanks for the help.
    Teensy #1 has 5V on its 3.3V pin. Looks like that regulator is shot. This is the one I was testing with.
    So, throw out all of those tests
    Now to try Teensy #2
    2nd Teensy is OK. Added solder blob to Vin/VUSB and performed the factory reset. Removed blob
    and installed 2nd Teensy in the radio. Uploaded code and this Teensy seems to work.

    So, looks like a combination of a blown VR on the first Teensy, and the second Teensy went 'deaf' after one of my software 'upgrades'.
    .
    The second Teensy now seems to be OK and has been running the application for over 24 hours at this point. A blown 3.3V regulator providing 5V to the first Teensy produces all kinds of strange effects.

    Thank you for your help in resolving the issue!
    Mike

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,082
    I'd really like to know what caused the regulator to fail this way. I realize we'll probably never really know. But still, I believe this is the first case I've heard where the regulator failed as a short. Kinda disturbing...

    Bad code which interferes with the normal USB communication to request going into programming mode is unfortunately a reality of having complete control over the USB. That's why every Teensy has a button dedicated to getting back into programming mode, no matter what sort of code is loaded in the flash.

    Glad you got the 2nd board recovered. If you gain any insight about what damaged the regulator, please let me know?

Posting Permissions

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