TeensyTransfer

Hi Michael,
i've fixed some bugs - could you please try the new version ?
I'd like to know wether it works better for you .. :)

Thank you !

Unfortunately for me, it is worse. I downloaded the new TT files, and used the Teensy Loader 1.31 beta 1 to download it to my Teensy 3.6. I have the prop shield mounted on stacking headers, and I currently have to take it off the stack in order to press the program button on the 3.6. I then used the teensytransfer.gz file in the release direct, and I did an gunzip on it and changed permissions to be executable.

Back when I last used Teensytransfer on my 3.2, many months ago, the -e option was extremely slow, and now it is rather fast.

When I used yesterday's software, it would hang and give a communication error, but eventually with rebooting it, after every step, I could download my 3 files.

When I used today's software, it is extremely slow for -w, but each of the times it would drop a communication error:
Code:
-gnome-king-> ./teensytransfer-2016-10-11.exe -w WOLVES.MP3 
..................................................................................teensytransfer: Communication error
 
@MM - I use a wooden pencil body for my top header units with a board on top. Stick it between and roll/push until I find the button. Also TYQT can often get to bootloader or a reset.

Frank: If I put a flash chip on a FlexiBoard to test - will that work - and does it matter which I did?
 
Tim, no, but it defaults to U0 (chipselect pin 6)
Michael, thank you. I guess Arduino and TYQT were not running ? (They use rawhid ,too)
It seems to be a weird usb problem with linux, and I can not help much :-(
 
Last edited:
Tim, no, but it defaults to U0 (chipselect pin 6)
Michael, thank you. I guess Arduino and TXQT were not running ? (They use rawhid ,too)
It seems to be a weird usb problem with linux, and I can not help much :-(

Frank :no, but?: Any chance you mean it defaults to U1 where you marked it for W25Q128 that takes CS6? And that would work?
 
Thanks Frank :) - I was anxious to accept no for an answer - then I wouldn't have had to use TeensyTransfer - but now I have an excuse to put on a flash chip. The good thing is I read your schematic well enough to follow (chipselect pin 6). Though I still don't see U0 ;)
 
Frank: Soldered on the U1 Flash - is there a simple test sketch?

I have run examples\Flexiboard_Touchpaint on my T_3.5 and T_3.6.
 
Frank: Soldered on the U1 Flash - is there a simple test sketch?

TeensyTransfer :) Or the examples from the SerialFlash libary. The SPI-Connections on the FlexiBoard are the same as on Pauls Audio-Shield - so simply edit the code to use the right ones. Make sure that the display-cs-pullups are all soldered to the board or remove the display !

Do you want to test the PT8211, too ?
 
Last edited:
TeensyTransfer :) Or the examples from the SerialFlash libary. The SPI-Connections on the FlexiBoard are the same as on Pauls Audio-Shield - so simply edit the code to use the right ones. Make sure that the display-cs-pullups are all soldered to the board or remove the display !

Okay - TT gave FF's for SerFlash -info :( Though it is trying - and taking a long time to -eRASE. Not sure if I soldered badly - or I got a bad batch of chips. I did pull the display.

Using T-3.5 beta. This shows my SerFlash isn't recognized - but also shows -I (info) goes bad after a -l (list) that of course fails.
I:\tCode\libraries\TeensyTransfer\extras\teensytransfer>tt -i
ID : FF FF FF
Serial: FF FF FF FF FF FF FF FF
Size : 0 Bytes

I:\tCode\libraries\TeensyTransfer\extras\teensytransfer>tt -l
teensytransfer: Communication error

I:\tCode\libraries\TeensyTransfer\extras\teensytransfer>tt -i
teensytransfer: Communication error
 
Wtf?? I have three boards , all work - with flash,ram, teensytransfer and any other software...
 
Last edited:
Dunno - I think I got [surprise] a bad batch of eBaY chips!

Same batch that was failing on ParFlash testing.
 
@MM - I use a wooden pencil body for my top header units with a board on top. Stick it between and roll/push until I find the button. Also TYQT can often get to bootloader or a reset.

Frank: If I put a flash chip on a FlexiBoard to test - will that work - and does it matter which I did?

Yes, I haven't used TYQT yet, something to try.

In terms of pencil, the problem is I have full female stacking headers on the beta 3.6. I have normal female headers on the inside to bring out the Reset, Program, Vbat pins in the middle (and Vusb, AREF, A10, A11, & 2nd USB). And on top of that, I have a motion sensor prop shield with full stacking headers on it as well. For both the LED output and the speaker output, I have a 4 pin right angle female header soldered in, and the female header for the LEDs blocks access to the program pin. And the button is on the wrong side of the micro SD, so I can't reach it from that end.
 
Ok, I recompiled the Linux application on my system, rather than relying on your binary, and it now works great. I updated my libraries, and installed Teensy Transfer from source at 96 Mhz, and it ran fine. I was able to load 3 MP3 files of various sizes in one session.

I then recompiled it for 120 Mhz, and I started seeing some errors. It dropped the connection on one upload, and now the longest file is taking a long time to upload (at least 10 seconds or so between '.' updates). I finally got tired, and killed it, and went back to 96 Mhz.

Code:
-gnome-king-> ./teensytransfer-2016-10-12.exe teensy -i
Model : Teensy 3.6 (MK66FX1M0)
Serial: 2056430
MAC   : 04:E9:E5:03:23:4B
EEPROM: 4096 Bytes
F_CPU : 96000000 Hz
F_PLL : 96000000 Hz
F_BUS : 48000000 Hz
F_MEM : 24000000 Hz

-gnome-king-> for x in HOWL.MP3 WOLVES.MP3 MMASH.MP3; do echo; echo $x; ./teensytransfer-2016-10-12.exe -w $x; done

HOWL.MP3
...........................................

WOLVES.MP3
..................................................................................

MMASH.MP3
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

-gnome-king-> ./teensytransfer-2016-10-12.exe -l
  177677 HOWL.MP3
  339969 WOLVES.MP3
 3213312 MMASH.MP3

BTW, you have an unused variable:

Code:
/home/meissner/Arduino/libraries/TeensyTransfer/TeensyTransfer.cpp: In member function 'void TeensyTransfer::transfer()':
/home/meissner/Arduino/libraries/TeensyTransfer/TeensyTransfer.cpp:37:7: warning: unused variable 'n' [-Wunused-variable]
   int n;
       ^

Sketch uses 30,184 bytes (2%) of program storage space. Maximum is 1,048,576 bytes.
Global variables use 4,156 bytes (1%) of dynamic memory, leaving 257,988 bytes for local variables. Maximum is 262,144 bytes.

I still can't get the MP3 player to run, using the Arduino-Teensy-Codec-lib library I downloaded yesterday and this code:

Code:
#include <Audio.h>
#include <SerialFlash.h>
#include <play_sd_mp3.h>
//#include <play_sd_aac.h>


// GUItool: begin automatically generated code
//AudioPlaySdWav           playSdWav1;     //xy=154,422
AudioPlaySdMp3           playMp31; //xy=154,422
AudioMixer4              mixer1;         //xy=327,432
AudioOutputAnalog        dac1;           //xy=502,412
AudioConnection          patchCord1(playMp31, 0, mixer1, 0);
AudioConnection          patchCord2(playMp31, 1, mixer1, 1);
AudioConnection          patchCord3(mixer1, dac1);
// GUItool: end automatically generated code


#define PROP_AMP_ENABLE    5
#define FLASH_CHIP_SELECT  6

void setup() {
  AudioMemory(8); //4
  delay(2000);

  // Start SerialFlash
  if (!SerialFlash.begin(FLASH_CHIP_SELECT)) {
    while (1)
      {
        Serial.println ("Cannot access SPI Flash chip");
        delay (1000);
      }
  }

  //Set Volume
  mixer1.gain(0, 0.5);
  mixer1.gain(1, 0.5);

  //Start Amplifier
  pinMode(PROP_AMP_ENABLE , OUTPUT);
  digitalWrite(PROP_AMP_ENABLE , 1); 
}

void playFile(const char *filename)
{

  SerialFlashFile ff = SerialFlash.open(filename);
  Serial.print("Playing file: ");
  Serial.println(filename);  

  uint32_t sz = ff.size();
  uint32_t pos = ff.getFlashAddress();
  
  // Start playing the file.  This sketch continues to
  // run while the file plays.
  playMp31.play(pos,sz);

  // Simply wait for the file to finish playing.
  while (playMp31.isPlaying()) {yield();}
}


void loop() {
  //playFile("test.mp3");
  playFile("MMASH.MP3");
  delay(1000);
}
 
Last edited:
Thank you for the test of teensytransfer!
I'll remove that variable.

I have no real idea why it works better with 96Mhz. You ?
I could compile it here with 96MHz and send it to you - would you test it ? That way we know wether the problem is F_CPU or something else (linux -libaries??)
But, on the other hand, on my Windows, 120MHz work fine....

MP3: Ok, i'll test it in a hour or two !
 
It may be my environment is just electrically noiser than yours.

<edit>
But if you want me to test the pre-built .hex files at 96 Mhz, I can do that.
 
Last edited:
Michael,

i download my own MP3-lib from Github to test it :)

Them I tried your sketch (only edited the filename) - worked out of the box for my teensy 3.2 with propshield, and 3.5 / 3.6 with external speaker !

Do you use the pin DAC0 ?

Edit: i had to insert

SPI.setSCK(14); // Audio shield has SCK on pin 14
SPI.setMOSI(7); // Audio shield has MOSI on pin 7

for my T35/36 test - they are on the FlexiBoard which uses SPI-Pins similar to the Audioshied.
 
Last edited:
Note, if you are using the prop shield (as opposed to the audio shield), you need to set pin 5 to HIGH in order to enable the amplifier.
 
TT SD - future or no?

This looks like a great tool... per the GitHub readme, is there any plan to go ahead with uSD support? The system on which we are working has a uSD installed for system logs and we are wondering how a service person should access them: some download over USB, or just pop out the uSD and read it in a PC? So maybe the TT SD option is not really needed? Any opinions? Thanks...
 
Hi Frank!
Got some problem here with teensytransfert:
like defraster, the cmd line tells me "Teensytrasfer: Communication error" but if i digit -i teensy then the program prints all the data related with the teensy.
I've Win10 running on my pc with latest version of all your stuff and arduino ide, as long as teensyduino.
Can you pls help me?
Thank you
 
Hi Frank!
Got some problem here with teensytransfert:
like defraster, the cmd line tells me "Teensytrasfer: Communication error" but if i digit -i teensy then the program prints all the data related with the teensy.
I've Win10 running on my pc with latest version of all your stuff and arduino ide, as long as teensyduino.
Can you pls help me?
Thank you

Yes, try the pre-compiled hex-files or use a lower f_cpu like 72MHz
 
Yes, try the pre-compiled hex-files or use a lower f_cpu like 72MHz

Done right now but the error still persists:

Model : Teensy 3.1/3.2 (MK20DX256)
Serial: 2685130
MAC : 04:E9:E5:04:18:E1
EEPROM: 2048 Bytes
F_CPU : 72000000 Hz
F_PLL : 72000000 Hz
F_BUS : 36000000 Hz
F_MEM : 24000000 Hz

Thank you for your help! Additional information: i'm trying to upload files to the prop shield, i've tried also the -w eeprom does not work at all (no error printed, just checking eeprom memory and it's the same before and after the -w eeprom command.).
 
Is the flash erased ? If not, do it first:

Code:
teensytransfer -e

To be sure to have a working sketch on the teensy, use the pre-compiled hex-file, please. This is known to work.
If it - still - not works, there's a strange problem with your hardware.
i.e. ... Is the shield soldered to the teensy ? If not, solder it. It does not work without..
 
Last edited:
Back
Top