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

Thread: Teensy 4.0 (+AudioShield) running, but not recognized by Mac any more

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8

    Teensy 4.0 (+AudioShield) running, but not recognized by Mac any more

    Hello all,

    My Teensy 4.0 (soldered to an AudioShield) worked without problems for some weeks. While working with a second Teensy (3.5) and not flashing the other one for some time, I realized that the 4.0 is not visible in the Arduino IDE any more. However it was powered by the iMac the whole time (connected to the keyboard USB port, see picture) and transmitting data to the 3.5 via an NRF24 as intended.

    What I tried so far:

    > Different cables, different USB ports (all cables and ports working fine with all my Teensys)
    > Isolating it from other hardware (testing only Teensy+AudioShield, no change)
    > Arduino IDE upgrade/downgrade (no change, all other Teensys still working, current version: 1.8.9)
    > Teensyduino upgrade/downgrade (no change, all other Teensys still working, current version: 1.52-beta1)
    > 15s push button restore to blink sketch (worked, now it is blinking faithfully, still not recognized)
    > Holding down the button while plugging it in (no change, remains RED and Teensy loader does not program it)
    > I pulled the VDD and both GND pins to disconnect the AudioShield (no change, see pictures)
    > Downloaded TyCommander (does not show up, other Teensys do immediately)
    > Connected it to my company Windows 10 notebook (does not appear in device manager)
    > I cleared the NVRAM of my iMac (CMD + Option + P + R) in case it stored something about this USB device (no change)

    Then I started Wireshark to see if there is anything on USB (no clue about USB though..):
    > Connected to one of the USB 2.0 ports on the (old) iMac keyboard, Wireshark shows a stream of messages
    > Connected to the USB 3.0 port on the back directly, nothing at all

    Any ideas? I'm running out of ideas..

    Best wishes,
    Ernst
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	T4Top.jpg 
Views:	3 
Size:	251.4 KB 
ID:	19792   Click image for larger version. 

Name:	T4Bottom.jpg 
Views:	6 
Size:	269.6 KB 
ID:	19793  

    Click image for larger version. 

Name:	T4Connection.jpg 
Views:	6 
Size:	252.1 KB 
ID:	19794   Click image for larger version. 

Name:	WiresharkKeyboardPort.png 
Views:	6 
Size:	188.3 KB 
ID:	19795  

    Click image for larger version. 

Name:	1_HarwareSetup.jpg 
Views:	4 
Size:	226.1 KB 
ID:	19796  

  2. #2
    I may have run into this as well, and was able to resolve it if it was the same thing.

    It appears that the built-in blink sketch is putting the Teensy4 USB into RawHID mode instead of Serial mode. If you look in About This Mac / System Report... / USB you can see the Teensy listed, but you can't connect over serial. After resetting the Teensy to the built-in blink (and restarting my machine, don't know if that was required) I was able to build the basic Blink sketch in Teensyduino with Serial USB selected and then load the HEX file with Teensy loader. After that it was reset into Serial USB mode and I can talk to it again.

    Edit I spoke too soon. I can get the Serial port to return in Teensyduino, but as soon as I program the Teensy4 using Platform.io it disappears again. I haven't changed anything in my setup since this morning when everything was working fine.
    Last edited by ecurtz; 04-21-2020 at 08:00 PM.

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    How can you program the teensy if you have no connection?

    Try this:
    1. Use Arduino.
    2. Set USB-Type to Serial.
    3. Load the Blink-Sketch from the examples.
    4. Program the Teensy.

    Do you have a serial port now?

  4. #4
    It still shows up as a HID device and the Teensy loader app is able to talk to that. It just doesn't exist as a serial port. In Teensyduino while it's in that state it shows up in the Port list as "[no_device] Serial (Teensy 4.0)" and Teensyduino can't reset it, however the Teensy loader will still program it if you press the button. After it's successfully loaded it restores the serial port, until I break it again.

    It seems likely there's a bug in my code, but I don't see how it could be breaking the USB type, I thought that was something in protected memory set by the Teensy loader?

  5. #5
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    Maybe a crude setting in Platformio.

  6. #6
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8
    My T4 does not show up the "About this Mac > System Report" (also not in a Windows Device Manager), but other Teensys do. Since it was never connected to an external power supply, I doubt that I fried something.. Is there a way to reset it even "harder" than with the 15s restore function?

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,082
    The 15 second button press is the deepest possible "reset" back to a known good state. You can generally tell if it worked because you'll see the red LED bright for several seconds while it's wiping the flash, then the orange LED blink after after it's complete, because it writes a known-good LED program into the beginning of the flash memory and reboots to run it.

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,765
    The 15s Restore is the only and best way to restore the 1062 processor state. The Secondary bootloader MCU is hardcoded to perform it's function.

    After the 15s Restore the factory Blink app is not USB aware and will blink as it does from the factory without USB presence. It takes a Button press for the first upload at that point.

    If the Arduino IDE is used to verify a proper Blink Sketch to a usable HEX file - the TeensyLoader will upload that sketch to the Teensy. If compiled with Serial USB then the PC will see the Teensy as USB and be able to trigger the automatic upload of the next sketch.

    If that doesn't work then typically the cable is bad - the computer software/hardware setup is deficient or the factory tested Teensy has suffered some damage or confused wiring or perhaps a latent defect not generally seen.

  9. #9
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8
    Then I'm afraid the T4 will be sent to retirement... Thanks for your time and suggestions!
    If I can revive it somehow, I will post an update.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,082
    I'm curious, can you tell us what you saw happen when you attempted the 15 second restore? We can't see your Teensy over the internet, so the only way we know any details to be able to help you is if you tell us what really happened.

    Did you get a quick flash on the red LED after holding the button? Did the red LED turn on bright for several seconds when you released the button? Did the red LED turn off? Did the orange LED start blinking again?

    After all that, when you unplug (removing all power) and reconnect the USB cable, does the orange LED blink? Does pressing the button stop the orange LED blinking? Does the red LED turn on? Is the red LED dim, bright, on solid or blinking? These details matter for troubleshooting. If you'd like better help, please don't keep us in the dark. Tell us specifically what you're seeing.

  11. #11
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8
    15s restore worked (and works) exactly as you explained:
    1. Hold down button for 15s
    2. Red LED flashes briefly, I released the button
    3. Red LED is solid and bright for about 10s
    4. Red LED turns off, orange LED blinks every second

    After every power cylce it immediately starts to blink orange, just like a new one.

    When I press the program button once, the red LED turns on (orange LED turns off) not as bright and if I look closely it flickers a bit. Teensy loader does nothing (valid, simple .hex file is loaded) and the board stays in this state as long as it is plugged in (no USB device detected). When I remove power and plug it in again, it starts the blink program again.

  12. #12
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8
    After a long time connected to Windows 10 (blinking along for more than 30min), I received this message in the device manager:

    "Device has been stopped after it reported an Error (Code 43). Error after requesting a USB port reset." (see picture for german message)

    Click image for larger version. 

Name:	WindowsDeviceManagerError.PNG 
Views:	4 
Size:	16.2 KB 
ID:	19809

  13. #13
    Junior Member
    Join Date
    Apr 2020
    Location
    Austria, AUT
    Posts
    8
    Last attempt (failed):
    > I separated the T4 from the AudioShield (no change)
    > I probed the USB D+ line (3rd pin from the top if the connector is on the left), it seems that it tries to communicate every 250ms (see pictures, last one is the USB D+ line of a healthy T4 after pressing the program button)

    Any thoughts or should I let it rest in peace?

    Click image for larger version. 

Name:	IMG_4126.jpg 
Views:	2 
Size:	267.8 KB 
ID:	19835
    Click image for larger version. 

Name:	2020-04-25_UsbD+DeadTeensy_1.jpg 
Views:	3 
Size:	125.6 KB 
ID:	19836
    Click image for larger version. 

Name:	2020-04-25_UsbD+DeadTeensy_2.jpg 
Views:	3 
Size:	123.1 KB 
ID:	19837
    Click image for larger version. 

Name:	2020-04-25_UsbD+HealtyTeensyAfterProgramButton.jpg 
Views:	3 
Size:	122.6 KB 
ID:	19838

Posting Permissions

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