Please Post Code & Details In Your Question!

Status
Not open for further replies.
Hi, I connect 2 teensy 3.5 to make an spectrum analyzer. An audio board is connected to a master Teensy. I sent 4 bands of FFT to the slave Teensy using Serial TX pin 1. Since the data is in float, i converted it to int and parse it into a string and ended it with \n so that at the slave side I can detect an newline and split the data. However I noticed Teensy will stuck after sometimes. The slave data will be used to control the led array, somehow if i remove the led function, slave teensy will not stuck.

Code:
//serial from master
  if (Serial1.available()) {
    //        Serial.println(".");
    if (Serial1.read() == '\n') {
      int_1 = Serial1.parseInt();
      int_2 = Serial1.parseInt();
      int_3 = Serial1.parseInt();
      int_4 = Serial1.parseInt();
    }
  }



Master to Slave
Code:
    //convert float to int for slave
    //    Serial.println();
    int1 = 1000 * myFFT.read(47, 93); //2k to 4k
    int2 = 1000 * myFFT.read(94, 186); //4k to 8k
    int3 = 1000 * myFFT.read(187, 255); //8k to 11k
    int4 = 1000 * myFFT.read(256, 511); //11k to 22k

    //send to slave
    if (currentMillis - previousMillis_2 > 10) {
      // save the last time you blinked the LED
      previousMillis_2 = currentMillis;
      //      Serial.print(int1);
      Serial1.print(int1); Serial1.print(",");
      Serial1.print(int2); Serial1.print(",");
      Serial1.print(int3); Serial1.print(",");
      Serial1.print(int4); Serial1.print('\n');
    }
 
New Teensy4.0 dev confusion

I am a new user at Teensy platform. Have done a number other platforms. I get one shot at programming Teensy 4.0. Using VSCode under Win10(64) with Teensy Loader 1.52. Code compiles, downloads, and reboots Teensy on first try. Any combination of pressing button, power reset, hard-reload to default blink doesn't seem to allow another download. Pressing the button gives dim red LED. Log shows timeout. Code is blink with changed timing. Nothing complex. Am I missing a configuration item? Attached are the first-time log and the second time log.View attachment log.txtView attachment secondlog.txt
 
I am a new user at Teensy platform. Have done a number other platforms. I get one shot at programming Teensy 4.0. Using VSCode under Win10(64) with Teensy Loader 1.52. Code compiles, downloads, and reboots Teensy on first try. Any combination of pressing button, power reset, hard-reload to default blink doesn't seem to allow another download. Pressing the button gives dim red LED. Log shows timeout. Code is blink with changed timing. Nothing complex. Am I missing a configuration item? Attached are the first-time log and the second time log.View attachment 21861View attachment 21862

Not sure if it helps - but TeensyDuino latest release is ver. 1.53

Also there are existing threads that might have focus on this issue - not recalling the context - but there was a recent post on one time programming as you describe it that may help if you discovered it with Forum search - or Bing or gooGle.
 
Apparently Teensy Loader doesn't handle going through an external USB3 hub. Running a short usb cable directly to the system (a huge hassle) makes the Auto function work as advertised.
 
Not all USB hubs are created equal.

I use Teensy regularly through a USB3 hub which is permanently mounted to the side of my desk. I've also used a few others at times. All worked.

Can you give up the name and model number of this USB3 hub? Or a photo if you don't have any other info?
 
Powered "Juiced Systems" 8-port. (Also permanently mounted behind my 30" monitor). This is connected to Gigabyte Aorus B540 MB
Screenshot 2020-09-26 093915.png
 
Not all USB hubs are created equal.
...

@Paul - I sent you a USB3 Hub that failed after a T_4.? bootloader update - no idea if it is related as that thread long past - seemed like it was an edge case (Restore or Power On/Off???). If you look to repro that might provide ready reference hardware.

The Replacement USB3 HUB 'Atolla' from AMZN [ same/similar as used by @KurtE ] has worked without issues for all Teensy one or more at a time - as have all other connect methods hubs used here on Win 10 - using IDE and IDE w/TyCommander - not VSCode.
 
@Paul and @defragster, thanks for the info. I have a temporary workaround that works great and will do some hub investigation. I'm just happy to be getting to work on my project instead of wrestling the workflow.
 
Status
Not open for further replies.
Back
Top