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

Thread: Error when uploading code, and after that board is not working

  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    11

    Error when uploading code, and after that board is not working

    I have just experienced this strange thing with my Teensy 3.2. I tried to upload the code from the youtube-tutorial series Teensy-synth, and when trying to upload to board, it just turns of and i can not access it anymore from Teensyduino. But it can still connect to Teensy application, and if i press button on Teensy, ut suddenly shows up in Teensyduino as bootloader (not Teensy 3.2)
    It happened to three out of four of my boards. I am doing a workshop this weekend in MIDI, so this is a disaster. Hope for some good advice on how to get these up and runing againg.
    I have attached the code.
    Please tell me what more info to provide, and i will do it asap
    I am on a macbook 2020, 16", at Catalina.
    Pål Asle
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Jan 2021
    Posts
    11
    After multiple attempts, both yesterday and today, i managed to reboot two of three Teensys, and then program them with Teensyduino. The last one still isn't working. I also forgot to mention in my desperate post from yesterday that i use the teensy audio shield.

  3. #3
    I've had a usb hub "blacklist" a teensy for whatever reason. Required the hub to be power cycled before it'd let the teensy connect again. Definitely try rebooting the computer and power cycling any hubs (incl the one in your display, keyboard, etc).

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    14,197
    With one of the 'working' T_3.2's - In the IDE do a "VERIFY" compile a simple Blink sketch with USB Type: USB.
    Perhaps make sure setup() has some code like this to PRINT to SerMon opened to the connected Teensy port at hand
    Code:
      while (!Serial) ;
      Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    1 > Press the button on that Teensy and it should get the code and Blink.
    1 a > if Blink sketch has Serial.print() : go to the IDE select the Teensy Port for that T_3.2, Open Serial Monitor
    1 b > Look for output from the Teensy on SerMon
    2 > remove that T_3.2 - from that good USB cable
    3 > WHILE HOLDING THE BUTTON - plug in a remaining 'questionable' T_3.2, wait half a second, release the Button and then should also take that simple working Blink sketch
    3 a > if Blink sketch has Serial.print() : go to the IDE select the Teensy Port for that T_3.2, Open Serial Monitor
    3 b > Look for output from the Teensy on SerMon
    4 > for any other T_3.2 of concern repeat from step 2

  5. #5
    Junior Member
    Join Date
    Jan 2021
    Posts
    11
    Hi, thanks very much for the reply both of you. Looks like it was actually something as simple as the USB hub providing a very unstable connection. Really strange since i am never required to power it for such small loads as a microcontroller.
    This really saved my workshop this weekend! Thanks again!
    Pål Asle

  6. #6
    USB hubs have many strange and infuriating behaviors. Never trust one.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,290
    Glad it turned out to be just a bad hub.

    One of the hubs I have on my workbench feels like they skimped on the power supply or capacitors. It usually works but sometimes when plugging in a board with more circuitry the whole hub will stop communicating.

Posting Permissions

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