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

Thread: Long Upload Time on Teensy 3.6

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    12

    Long Upload Time on Teensy 3.6

    Hello!

    I have a project that is functionally working, however at a certain point I began to notice prolonged upload times. I have received an error twice (and admittedly, didn't google/screenshot it) that suggested an error having to do with the bootloader. I *think* it might have been directing me to this, and suggesting to add a delay prior to jumping to the bootloader: https://www.pjrc.com/teensy/jump_to_bootloader.html

    Since getting the rest of my code working and realizing I should have tackled the above problem when I first encountered it, I haven't been able to reproduce the pop-up error, however it is taking upwards of 30 seconds to upload my code on most occasions (95/100 times). It compiles in 2.5 seconds consistently.

    I've made a 16x4 step sequencer using 4 Adafruit Neotrellis boards (https://www.adafruit.com/product/3954) and am using the library written for it.

    Can anyone see any issues in my code that might cause this prolonged upload time? The code functions perfectly once uploaded, but I'm concerned that an issue could rear its head after longer use. And of course, if something is wrong, I'd like to fix/learn from it. Since the hardware is functioning fine I'm assuming it is a code problem, however I can upload photos of my wiring if that helps.

    Setup:
    2017 Macbook pro
    Arduino 1.8.7
    Teensy 3.6
    Teensy Loader 1.44
    Adafruit Neotrellis
    Library: Adafruit_NeoTrellis.h (which stems from the seesaw library)

    Thank you very much!

    Code:
    /*
      A standard 16x4 step sequencer for the Adafruit Neotrellis.
      When the playhead passes over a button that is on, a pulse is sent to an external LED.
    */
    
    #include "Adafruit_NeoTrellis.h"
    
    #define X_DIM 16 //number of columns of keys
    #define Y_DIM 4 //number of rows of key
    
    //create a matrix of trellis panels
    Adafruit_NeoTrellis t_array[Y_DIM / 4][X_DIM / 4] = {
      //i2c addresses are based on the jumpers on the back of each board
      { Adafruit_NeoTrellis(0x2E), Adafruit_NeoTrellis(0x2F), Adafruit_NeoTrellis(0x31), Adafruit_NeoTrellis(0x30)  }
    };
    
    //pass this matrix to the multitrellis object
    Adafruit_MultiTrellis trellis((Adafruit_NeoTrellis *)t_array, Y_DIM / 4, X_DIM / 4);
    
    int ledPins[4] = {30, 29, 10, 9};
    
    //used for advancing the playhead
    elapsedMillis playheadCounter;
    //used to avoid using delay();
    unsigned long previousMillis = 0;
    //sets the rate of the playhead
    unsigned long bpm = 167;
    //serves as the column number
    int buttonIndex;
    
    //tracks the presses on each button; odd values will turn on
    int pressCount[64] = {0};
    
    //define a callback for key presses
    TrellisCallback onOff(keyEvent evt) {
      for (int x = 0; x < X_DIM; x++) {
        //turn on each 16th pixel (resulting in the playhead)
        for (int y = 0; y < Y_DIM; y++) {
          int button_loc = x + y * X_DIM;
          if (evt.bit.EDGE == SEESAW_KEYPAD_EDGE_RISING) {
            pressCount[evt.bit.NUM]++;
          }
          trellis.show();
          return 0;
        }
      }
    }
    
    void setup() {
      Serial.begin(9600);
      //Set the ledPins to outputs and start them off
      for (int i = 0; i < 4; i++) {
        pinMode(ledPins[i], OUTPUT);
      }
      //while(!Serial);
      if (!trellis.begin()) {
        Serial.println("failed to begin Neotrellis");
        while (1);
      } else {
        Serial.println("Neotrellis started");
      }
      //Display a startup sequence to know that we're on
      for (int i = 0; i < Y_DIM * X_DIM; i++) {
        trellis.setPixelColor(i, seesaw_NeoPixel::Color(20, 20, 20));
        trellis.show();
      }
      //activate all keys in the array
      for (int y = 0; y < Y_DIM; y++) {
        for (int x = 0; x < X_DIM; x++) {
          //activate rising and falling edges on all keys
          trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_RISING, true);
          trellis.activateKey(x, y, SEESAW_KEYPAD_EDGE_FALLING, true);
          trellis.registerCallback(x, y, onOff);
          trellis.setPixelColor(x, y, 0x000000); //addressed with x,y
          trellis.show(); //show all LEDs
        }
      }
    }
    
    void loop() {
      trellis.read();
      unsigned long currentMillis = millis();
      //formula to calculate the rate at which the playhead moves
      if (currentMillis - previousMillis >= bpm) {
        previousMillis = currentMillis;
        buttonIndex++;
        buttonIndex = buttonIndex % 16;
      }
      //Playhead
      for (int x = 0; x < X_DIM; x++) {
        for (int y = 0; y < Y_DIM; y++) {
          int button_loc = x + y * X_DIM;
          if (x == buttonIndex) {
            //create white playhead, and everywhere else, light up the buttons that are 'on' based on row color; otherwise set to off
            trellis.setPixelColor(button_loc, seesaw_NeoPixel::Color(100, 100, 100));
          } else if (pressCount[button_loc] % 2 && y == 0) {
            trellis.setPixelColor(button_loc, seesaw_NeoPixel::Color(255, 0, 0));
          } else if (pressCount[button_loc] % 2 && y == 1) {
            trellis.setPixelColor(button_loc, seesaw_NeoPixel::Color(0, 255, 0));
          } else if (pressCount[button_loc] % 2 && y == 2) {
            trellis.setPixelColor(button_loc, seesaw_NeoPixel::Color(0, 0, 255));
          } else if (pressCount[button_loc] % 2 && y == 3) {
            trellis.setPixelColor(button_loc, seesaw_NeoPixel::Color(255, 255, 0));
          } else {
            trellis.setPixelColor(button_loc, 0);
          }
          // check to send pulse
          //if the button is on, and the playhead is over it, pulse the external led
          if (pressCount[button_loc] % 2 && x == buttonIndex && y == 0) {
            digitalWrite(ledPins[y], HIGH);
            if (currentMillis - previousMillis >= 20) {
              digitalWrite(ledPins[y], LOW);
            }
          } else if (pressCount[button_loc] % 2 && x == buttonIndex && y == 1) {
            digitalWrite(ledPins[y], HIGH);
            if (currentMillis - previousMillis >= 20) {
              digitalWrite(ledPins[y], LOW);
            }
          } else if (pressCount[button_loc] % 2 && x == buttonIndex && y == 2) {
            digitalWrite(ledPins[y], HIGH);
            if (currentMillis - previousMillis >= 20) {
              digitalWrite(ledPins[y], LOW);
            }
          } else if (pressCount[button_loc] % 2 && x == buttonIndex && y == 3) {
            digitalWrite(ledPins[y], HIGH);
            if (currentMillis - previousMillis >= 20) {
              digitalWrite(ledPins[y], LOW);
            }
          }
        }
      }
      //show all LEDs
      trellis.show();
    }
    Last edited by obbligato; 04-15-2019 at 09:00 AM.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,565
    Try an upload with a simple Blink or other example that can be built and uploaded by anyone to compare your results.

    Is the upload time required affected doing a button press before trying the upload - if TeensyLoader is active the 'AUTO' mode on the GUI will need to be deselected to have it wait for the IDE to provide the upload for the new code.

    TeensyLoader has a Verbose info output to enable that will show if it is having fights of any sort getting the upload to the Teensy.

    Not noted the version of TeensyDuino installed?

    So far it should be safe to suggest the '15 second' reset available on the T_3.6. Start a timer and mark 15 seconds from button press and hold until release on the powered Teensy. This will perform a PJRC supplied restore of the processor - it will then be void of any code and require a button press for the next upload.

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Quote Originally Posted by defragster View Post
    Try an upload with a simple Blink or other example that can be built and uploaded by anyone to compare your results.

    Is the upload time required affected doing a button press before trying the upload - if TeensyLoader is active the 'AUTO' mode on the GUI will need to be deselected to have it wait for the IDE to provide the upload for the new code.

    TeensyLoader has a Verbose info output to enable that will show if it is having fights of any sort getting the upload to the Teensy.

    Not noted the version of TeensyDuino installed?

    So far it should be safe to suggest the '15 second' reset available on the T_3.6. Start a timer and mark 15 seconds from button press and hold until release on the powered Teensy. This will perform a PJRC supplied restore of the processor - it will then be void of any code and require a button press for the next upload.
    Thanks for your reply. I've updated my initial post with my teensy loader version (1.44). Also, I realize I didn't have my OS: High Sierra 10.13.6.

    The 15 second reset seemed to work at first, however the problem resurfaced shortly after. The blink sketch is also taking a long time now, and so I guess it isn't my code. Thanks for turning me onto the teensyloader verbose logging. Below is the output when loading Blink (~29 seconds). Below that I've included logs from loading my sequencer code (~4 secs) moments later, to compare.

    Blink upload: ~29secs:

    Code:
    13:47:00.102 (reboot 1530): Begin, version=1.44
    13:47:00.102 (reboot 1530): location = usb:14500000
    13:47:00.102 (reboot 1530): Only location usb:14500000 will be tried
    13:47:00.102 (reboot 1530): portlabel = HID=16c0:0478.ff9c.22 (Teensy 3.6) Bootloader
    13:47:00.102 (reboot 1530): portprotocol = Teensy
    13:47:00.102 (reboot 1530): USB device add callback
    13:47:00.102 (reboot 1530):   loc=14500000, vid=16C0, pid=0483, ver=0277, ser=5223380
    13:47:00.102 (reboot 1530):   actual serailnum=522338
    13:47:03.310 (loader): remote connection 21 closed
    13:47:03.449 (loader): remote connection 20 opened
    13:47:03.578 (loader): remote connection 20 closed
    13:47:03.706 (loader): remote connection 20 opened
    13:47:03.830 (reboot 1530): USB device remove callback
    13:47:03.830 (reboot 1530): Serial add callback
    13:47:03.831 (reboot 1530):   name=/dev/cu.usbmodem5223381, loc=14500000, vid=16c0, pid=0483, ver=0277
    13:47:03.912 (reboot 1530): Serial remove callback
    13:47:03.916 (reboot 1530): HID Manager started
    13:47:03.917 (reboot 1530): found Teensy Loader, version 1.44
    13:47:03.917 (reboot 1530): Sending command: show:arduino_attempt_reboot
    13:47:08.778 (loader): remote cmd from 20: "show:arduino_attempt_reboot"
    13:47:08.923 (loader): got request to show arduino rebooting message
    13:47:09.058 (reboot 1530): Sending command: comment: Teensyduino 1.44 - MACOSX (teensy_reboot)
    13:47:09.064 (loader): remote cmd from 20: "comment: Teensyduino 1.44 - MACOSX (teensy_reboot)"
    13:47:09.203 (loader): remote cmd from 20: "status"
    13:47:09.340 (reboot 1530): Status: 1, 1, 0, 326, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:09.340 (reboot 1530): do_reset (serial) /dev/cu.usbmodem5223381
    13:47:09.344 (loader): remote cmd from 20: "status"
    13:47:09.481 (reboot 1530): Status: 1, 1, 0, 326, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:09.481 (reboot 1530): status read, retry 0
    13:47:09.583 (loader): remote cmd from 20: "status"
    13:47:09.690 (ports 780): Serial remove callback
    13:47:09.690 (ports 780): USB device remove callback
    13:47:09.690 (ports 780): remove, loc=14500000
    13:47:09.690 (ports 780): usb_remove: usb:14500000
    13:47:09.690 (ports 780): del device: location=14500000
    13:47:09.735 (reboot 1530): Status: 1, 1, 0, 326, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:09.735 (reboot 1530): status read, retry 1
    13:47:09.752 (ports 780): USB device add callback
    13:47:09.752 (ports 780):   loc=14500000, vid=16C0, pid=0478, ver=0103, ser=0007F862
    13:47:09.752 (ports 780):   actual serailnum=522338
    13:47:09.752 (ports 780):   found prior teensy at this loc, age=0.061
    13:47:09.752 (ports 780):     name: [no_device] (Teensy 3.6) Bootloader
    13:47:09.822 (ports 780): HID add callback, vid=16c0, pid=0478, ver=0103, loc=14500000, use=ff9c:22
    13:47:09.822 (ports 780):   found prior teensy at this loc, age=0.071
    13:47:09.822 (ports 780):     name: HID=16c0:0478.ff9c.22 (Teensy 3.6) Bootloader
    13:47:15.314 (loader): HID/macos: attach callback
    13:47:15.438 (loader): remote cmd from 20: "status"
    13:47:15.566 (loader): Device came online, code_size = 1048576
    13:47:15.694 (loader): Board is: Teensy 3.6 (MK66FX1M0), version 1.03
    13:47:15.823 (loader): File "Blink.ino.hex". 10732 bytes, 1% used
    13:47:15.950 (loader): set background IMG_ONLINE
    13:47:16.079 (loader): File "Blink.ino.hex". 10732 bytes, 1% used
    13:47:16.204 (loader): elf size appears to be 1048576
    13:47:16.331 (loader): elf binary data matches hex file
    13:47:16.459 (loader): Code size from .elf file = 1048576
    13:47:16.585 (loader): begin operation
    13:47:16.713 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:16.744 (loader): flash, block=0, bs=1024, auto=1
    13:47:16.868 (loader): remote cmd from 20: "status"
    13:47:16.985 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:17.000 (loader): flash, block=1, bs=1024, auto=1
    13:47:17.130 (loader): remote cmd from 20: "status"
    13:47:17.260 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:17.264 (loader): flash, block=2, bs=1024, auto=1
    13:47:17.399 (loader): remote cmd from 20: "status"
    13:47:17.525 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:17.530 (loader): flash, block=3, bs=1024, auto=1
    13:47:17.664 (loader): remote cmd from 20: "status"
    13:47:17.790 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:17.795 (loader): flash, block=4, bs=1024, auto=1
    13:47:17.929 (loader): remote cmd from 20: "status"
    13:47:18.056 (reboot 1530): Status: 1, 1, 1, 327, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:47:18.061 (loader): flash, block=5, bs=1024, auto=1
    13:47:18.107 (reboot 1530): status read, retry 2
    13:47:18.107 (reboot 1530): Success
    13:47:18.107 (reboot 1530): Disconnect
    13:47:18.202 (loader): remote connection 20 closed
    13:47:18.202 (loader): flash, block=6, bs=1024, auto=1
    13:47:18.204 (loader): flash, block=7, bs=1024, auto=1
    13:47:22.994 (loader): flash, block=8, bs=1024, auto=1
    13:47:23.141 (loader): flash, block=9, bs=1024, auto=1
    13:47:23.277 (loader): flash, block=10, bs=1024, auto=1
    13:47:23.417 (loader): sending reboot
    13:47:23.557 (loader): begin wait_until_offline
    13:47:23.720 (loader): HID/macos: status: ok
    13:47:23.888 (ports 780): HID remove callback
    13:47:23.888 (ports 780): HID add callback, vid=16c0, pid=0478, ver=0103, loc=14500000
    13:47:23.888 (ports 780): USB device remove callback
    13:47:23.888 (ports 780): remove, loc=14500000
    13:47:23.888 (ports 780): usb_remove: usb:14500000
    13:47:23.888 (ports 780): del device: location=14500000
    13:47:23.914 (loader): HID/macos: detach callback: is currently open device
    13:47:23.950 (ports 780): USB device add callback
    13:47:23.951 (ports 780):   loc=14500000, vid=16C0, pid=0483, ver=0277, ser=5223380
    13:47:23.951 (ports 780):   actual serailnum=522338
    13:47:23.951 (ports 780):   found prior teensy at this loc, age=0.062
    13:47:23.951 (ports 780):     name: [no_device] (Teensy 3.6) Serial
    13:47:24.064 (loader): offline, waited 1
    13:47:24.209 (loader): end operation, total time = 7.499 seconds
    13:47:24.350 (loader): set background IMG_REBOOT_OK
    13:47:24.490 (loader): redraw timer set, image 14 to show for 1200 ms
    13:47:29.471 (loader): HID/macos: number of devices found = 0
    13:47:29.621 (loader): HID/macos: no devices found (empty set)
    13:47:29.763 (loader): redraw, image 9
    Sequencer upload: ~4secs:

    Code:
    13:49:48.191 (post_compile 1531): Begin, version=1.44
    13:49:48.192 (loader): remote connection 20 opened
    13:49:48.342 (post_compile 1531): Sending command: comment: Teensyduino 1.44 - MACOSX (teensy_post_compile)
    13:49:48.342 (loader): remote cmd from 20: "comment: Teensyduino 1.44 - MACOSX (teensy_post_compile)"
    13:49:48.475 (loader): remote cmd from 20: "status"
    13:49:48.605 (post_compile 1531): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_501494/, Blink.ino.hex
    13:49:48.605 (post_compile 1531): Sending command: dir:/var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/
    13:49:48.605 (loader): remote cmd from 20: "dir:/var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/"
    13:49:48.737 (post_compile 1531): Sending command: file:2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:48.737 (loader): remote cmd from 20: "file:2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex"
    13:49:48.878 (loader): File "2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex". 21152 bytes, 2% used
    13:49:49.012 (loader): remote cmd from 20: "status"
    13:49:49.143 (post_compile 1531): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.143 (post_compile 1531): Disconnect
    13:49:49.154 (loader): remote connection 20 closed
    13:49:49.388 (post_compile 1532): Begin, version=1.44
    13:49:49.389 (loader): remote connection 20 opened
    13:49:49.389 (post_compile 1532): Sending command: comment: Teensyduino 1.44 - MACOSX (teensy_post_compile)
    13:49:49.389 (loader): remote cmd from 20: "comment: Teensyduino 1.44 - MACOSX (teensy_post_compile)"
    13:49:49.390 (loader): remote cmd from 20: "status"
    13:49:49.390 (post_compile 1532): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.390 (post_compile 1532): Disconnect
    13:49:49.403 (post_compile 1533): Running teensy_reboot: /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/teensy_reboot
    13:49:49.403 (loader): remote connection 20 closed
    13:49:49.403 (loader): remote connection 20 opened
    13:49:49.404 (loader): remote connection 20 closed
    13:49:49.408 (reboot 1534): Begin, version=1.44
    13:49:49.408 (reboot 1534): location = usb:14500000
    13:49:49.408 (reboot 1534): portlabel = HID=16c0:0478.ff9c.22 (Teensy 3.6) Bootloader
    13:49:49.408 (reboot 1534): portprotocol = Teensy
    13:49:49.408 (reboot 1534): Only location usb:14500000 will be tried
    13:49:49.408 (reboot 1534): USB device add callback
    13:49:49.409 (reboot 1534):   loc=14500000, vid=16C0, pid=0483, ver=0277, ser=5223380
    13:49:49.409 (reboot 1534):   actual serailnum=522338
    13:49:49.413 (loader): remote connection 20 opened
    13:49:49.413 (reboot 1534): USB device remove callback
    13:49:49.414 (reboot 1534): Serial add callback
    13:49:49.416 (reboot 1534):   name=/dev/cu.usbmodem5223381, loc=14500000, vid=16c0, pid=0483, ver=0277
    13:49:49.515 (reboot 1534): Serial remove callback
    13:49:49.519 (reboot 1534): HID Manager started
    13:49:49.520 (reboot 1534): found Teensy Loader, version 1.44
    13:49:49.520 (reboot 1534): Sending command: show:arduino_attempt_reboot
    13:49:49.520 (loader): remote cmd from 20: "show:arduino_attempt_reboot"
    13:49:49.520 (loader): got request to show arduino rebooting message
    13:49:49.521 (reboot 1534): Sending command: comment: Teensyduino 1.44 - MACOSX (teensy_reboot)
    13:49:49.523 (loader): remote cmd from 20: "comment: Teensyduino 1.44 - MACOSX (teensy_reboot)"
    13:49:49.523 (loader): remote cmd from 20: "status"
    13:49:49.523 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.523 (reboot 1534): do_reset (serial) /dev/cu.usbmodem5223381
    13:49:49.527 (loader): remote cmd from 20: "status"
    13:49:49.527 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.527 (reboot 1534): status read, retry 0
    13:49:49.631 (loader): remote cmd from 20: "status"
    13:49:49.632 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.632 (reboot 1534): status read, retry 1
    13:49:49.736 (loader): remote cmd from 20: "status"
    13:49:49.737 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.737 (reboot 1534): status read, retry 2
    13:49:49.839 (loader): remote cmd from 20: "status"
    13:49:49.839 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.839 (reboot 1534): status read, retry 3
    13:49:49.867 (ports 780): Serial remove callback
    13:49:49.867 (ports 780): USB device remove callback
    13:49:49.867 (ports 780): remove, loc=14500000
    13:49:49.867 (ports 780): usb_remove: usb:14500000
    13:49:49.867 (ports 780): del device: location=14500000
    13:49:49.930 (ports 780): USB device add callback
    13:49:49.931 (ports 780):   loc=14500000, vid=16C0, pid=0478, ver=0103, ser=0007F862
    13:49:49.931 (ports 780):   actual serailnum=522338
    13:49:49.931 (ports 780):   found prior teensy at this loc, age=0.064
    13:49:49.931 (ports 780):     name: [no_device] (Teensy 3.6) Bootloader
    13:49:49.943 (loader): remote cmd from 20: "status"
    13:49:49.943 (reboot 1534): Status: 1, 1, 0, 327, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:49.943 (reboot 1534): status read, retry 4
    13:49:50.006 (loader): HID/macos: attach callback
    13:49:50.006 (ports 780): HID add callback, vid=16c0, pid=0478, ver=0103, loc=14500000, use=ff9c:22
    13:49:50.006 (ports 780):   found prior teensy at this loc, age=0.075
    13:49:50.006 (ports 780):     name: HID=16c0:0478.ff9c.22 (Teensy 3.6) Bootloader
    13:49:50.046 (loader): remote cmd from 20: "status"
    13:49:50.047 (loader): Device came online, code_size = 1048576
    13:49:50.047 (loader): Board is: Teensy 3.6 (MK66FX1M0), version 1.03
    13:49:50.051 (loader): File "2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex". 21152 bytes, 2% used
    13:49:50.052 (loader): set background IMG_ONLINE
    13:49:50.057 (loader): File "2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex". 21152 bytes, 2% used
    13:49:50.058 (loader): elf size appears to be 1048576
    13:49:50.058 (loader): elf binary data matches hex file
    13:49:50.058 (loader): Code size from .elf file = 1048576
    13:49:50.058 (loader): begin operation
    13:49:50.061 (reboot 1534): Status: 1, 1, 1, 328, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:50.069 (loader): flash, block=0, bs=1024, auto=1
    13:49:50.073 (loader): flash, block=1, bs=1024, auto=1
    13:49:50.075 (loader): flash, block=2, bs=1024, auto=1
    13:49:50.077 (loader): flash, block=3, bs=1024, auto=1
    13:49:50.356 (loader): remote cmd from 20: "status"
    13:49:50.357 (reboot 1534): Status: 1, 1, 1, 328, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:50.357 (loader): flash, block=4, bs=1024, auto=1
    13:49:50.360 (loader): flash, block=5, bs=1024, auto=1
    13:49:50.362 (loader): flash, block=6, bs=1024, auto=1
    13:49:50.381 (loader): flash, block=7, bs=1024, auto=1
    13:49:50.384 (loader): flash, block=8, bs=1024, auto=1
    13:49:50.387 (loader): flash, block=9, bs=1024, auto=1
    13:49:50.406 (loader): flash, block=10, bs=1024, auto=1
    13:49:50.408 (loader): flash, block=11, bs=1024, auto=1
    13:49:50.428 (loader): remote cmd from 20: "status"
    13:49:50.428 (reboot 1534): Status: 1, 1, 1, 328, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:50.429 (loader): flash, block=12, bs=1024, auto=1
    13:49:50.432 (loader): flash, block=13, bs=1024, auto=1
    13:49:50.434 (loader): flash, block=14, bs=1024, auto=1
    13:49:50.454 (loader): flash, block=15, bs=1024, auto=1
    13:49:50.456 (loader): flash, block=16, bs=1024, auto=1
    13:49:50.459 (loader): flash, block=17, bs=1024, auto=1
    13:49:50.477 (loader): flash, block=18, bs=1024, auto=1
    13:49:50.480 (loader): remote cmd from 20: "status"
    13:49:50.480 (reboot 1534): Status: 1, 1, 1, 328, 0, 1, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:50.480 (loader): flash, block=19, bs=1024, auto=1
    13:49:50.483 (loader): flash, block=20, bs=1024, auto=1
    13:49:50.506 (loader): sending reboot
    13:49:50.507 (loader): begin wait_until_offline
    13:49:50.508 (loader): HID/macos: status: ok
    13:49:50.854 (ports 780): HID remove callback
    13:49:50.854 (ports 780): HID add callback, vid=16c0, pid=0478, ver=0103, loc=14500000
    13:49:50.854 (ports 780): USB device remove callback
    13:49:50.854 (ports 780): remove, loc=14500000
    13:49:50.854 (ports 780): usb_remove: usb:14500000
    13:49:50.854 (ports 780): del device: location=14500000
    13:49:50.863 (loader): HID/macos: detach callback: is currently open device
    13:49:50.864 (loader): offline, waited 7
    13:49:50.864 (loader): end operation, total time = 0.806 seconds
    13:49:50.864 (loader): set background IMG_REBOOT_OK
    13:49:50.866 (loader): redraw timer set, image 14 to show for 1200 ms
    13:49:50.866 (loader): remote cmd from 20: "status"
    13:49:50.868 (loader): HID/macos: number of devices found = 0
    13:49:50.868 (loader): HID/macos: no devices found (empty set)
    13:49:50.868 (reboot 1534): Status: 1, 1, 0, 328, 0, 0, /var/folders/cx/hbt1kn7j6_v4s97g0rsw36700000gn/T/arduino_build_174552/, 2019_4_10_neotrellisSequencerWithOnOffWithCounter.ino.hex
    13:49:50.868 (reboot 1534): status read, retry 5
    13:49:50.868 (reboot 1534): Success
    13:49:50.868 (reboot 1534): Disconnect
    13:49:50.881 (loader): remote connection 20 closed
    13:49:50.919 (ports 780): USB device add callback
    13:49:50.920 (ports 780):   loc=14500000, vid=16C0, pid=0483, ver=0277, ser=5223380
    13:49:50.920 (ports 780):   actual serailnum=522338
    13:49:50.920 (ports 780):   found prior teensy at this loc, age=0.066
    13:49:50.920 (ports 780):     name: [no_device] (Teensy 3.6) Serial
    13:49:52.067 (loader): redraw, image 9

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,565
    Paul is best to read the Verbose - good info to post in this case.

    It seems there is something affecting - so more questions ...

    What is connected to the Teensy ? If the 'stuff' can be disconnected or powered off that will add some clarity.

    Also it is the code before the upload that would have some chance of slowing the NEXT upload. With nothing active connected … Try uploading a Blink with Serial USB - then do an IDE Auto upload two times in a row those two should work. Then the same with your code.

  5. #5
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Quote Originally Posted by defragster View Post
    Paul is best to read the Verbose - good info to post in this case.

    It seems there is something affecting - so more questions ...

    What is connected to the Teensy ? If the 'stuff' can be disconnected or powered off that will add some clarity.

    Also it is the code before the upload that would have some chance of slowing the NEXT upload. With nothing active connected Try uploading a Blink with Serial USB - then do an IDE Auto upload two times in a row those two should work. Then the same with your code.
    Thanks again for your prompt replies.

    I have a 16x4 neopixel matrix attached to the SDA/SCL pins (each with pullup resistors to 3.3v): 4 of these boards soldered together horizontally (https://www.adafruit.com/product/3954). Additionally I have 4 leds connected to pins 9, 10, 29 and 30. This will ultimately be a part of a larger project where the matrix will be powered externally.

    I've tried disconnecting the neopixel matrix from the SDA/SCL pins prior to upload however have seen both fast/slow speeds with that setup and I'm not able to identify any patterns. Will keep at it. Thanks again for your reply. If I can provide logs for any other scenario that might help to identify the root cause, please let me know.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,280
    Do you have another Teensy which isn't connected to other stuff?

  7. #7
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Quote Originally Posted by PaulStoffregen View Post
    Do you have another Teensy which isn't connected to other stuff?
    I have a couple of others that are parts of other projects. I can try to get at one later tonight and test with it. Do you suggest that I upload my sequencer code repeatedly and just see if I can replicate the problem?

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,280
    Yes. There's no point pouring a ton of work into analyzing what happening on your Mac if the problem is ultimately caused by something on the Teensy side, like power hogging circuitry interfering with the upload process,

  9. #9
    Hello, I have been looking for a project using the Teensy 3.6 and Neotrellis 16x4. I am trying to use the trellis as a sequencer and drum machine. Please can you provide a guide on how you wired it to the teensy and got it working, I have to troubleshoot to see what I'm doing wrong

  10. #10
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Quote Originally Posted by Orhema View Post
    Hello, I have been looking for a project using the Teensy 3.6 and Neotrellis 16x4. I am trying to use the trellis as a sequencer and drum machine. Please can you provide a guide on how you wired it to the teensy and got it working, I have to troubleshoot to see what I'm doing wrong
    Please start a new thread and I will reply there. Include what you have tried and what isn't working.

Posting Permissions

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