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

Thread: TeensyTransfer: Communication error / Teensy 3.2 + Prop Shield

  1. #1
    Junior Member
    Join Date
    Jul 2018
    Posts
    7

    TeensyTransfer: Communication error / Teensy 3.2 + Prop Shield

    Hi,

    I cannot get past a TeensyTransfer: Communication error (on Win10 PC) when running teensytransfer -i (or -l) from command prompt. Teensy 3.2 + soldered Prop Shield including A14/DAC to Prop AudioIN has successfully played sine1 and talkie sketch thru Prop Shield attached speaker confirming hardware is working. Have successfully run SerialFlash, EraseEverything before AND after running RawHardwareTest (All Tests Passed :-) and ListFiles shows no files on Flash Memory.
    If I run TeensyTransfer before running Raw HID sketch I get 'teensytransfer: no rawhid device found' error as expected. After loading RawHID sketch and running TeensyTransfer again, I the get the 'teensytransfer: Communication error'.
    I need to copy a RAW audio file to the Prop Shield Flash memory. Is TeensyTransfer the only way to do this? If so, any ideas on how to get past the communication error?

    Flash Memory has 8388608 bytes.
    Erasing ALL Flash Memory:
    estimated wait: 20 seconds.
    Yes, full chip erase is SLOW!
    .....................
    Erase completed
    actual wait: 21 seconds.

    +++++++++++++++++++
    Raw SerialFlash Hardware Test

    Read Chip Identification:
    JEDEC ID: EF 40 17
    Part Nummber: W25Q64FV
    Memory Size: 8388608 bytes
    Block Size: 65536 bytes

    Reading Chip...

    Writing 4096 signatures

    Double Checking All Signatures:
    all 4096 signatures read ok

    Checking Signature Pairs
    all 2047 signature pairs read ok

    Checking Read-While-Write (Program Suspend)
    write 256 bytes at 256
    write time was 426 microseconds.
    read-while-writing: 00 00 00 00 15 F5 95 4B
    test passed, good read while writing

    Checking Read-While-Erase (Erase Suspend)
    erase time was 174998 microseconds.
    erase correctly erased 65536 bytes
    read-while-erasing: 00 00 00 00 15 F5 95 4B
    test passed, good read while erasing

    All Tests Passed :-)

    Test data was written to your chip. You must run
    EraseEverything before using this chip for files.


  2. #2
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    I have continued trying to isolate what's causing my communication error. Have now run teensytransfer on multiple Win10 PC's and many different USB ports and cables. Same error on all. Ordered another Teensy 3.2 to test bare bones. Same communication error using teensytransfer -i teensy or eeprom; BUT I was reminded that when I switched the Teensy 3.2 with Prop Shield and now the new Teensy 3.2 to "Raw HID" Mode that I used the 'list_files' sketch (with USB Type set to Raw HID) to get WIn10 to acknowledge the presence of a Teensyduino RawHID device. The script also includes the statement "const int FlashChipSelect = 6; // digital pin for flash chip CS pin" which I assumed was needed.

    Is this the problem? I did not run the "teensytransfertool.ino" example because it would not compile.
    Compile error:
    -----------------
    Using library TeensyTransfer in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\TeensyTransfer (legacy)
    Using library SerialFlash at version 0.5 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SerialFlash
    Using library SPI at version 1.0 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SPI
    'class TeensyTransfer' has no member named 'transf'
    --------------------

    Is that last line in the script "ttransfer.transf" that is stopping the compiling a prerequisite for teensytransfer to communicate? I'm hoping that's it and I just need to to fix what is probably a library issue. If not, I'm out of things to try and will begrudgingly need to give up on the Prop Shield. Any suggestions for other things to try would be greatly welcomed.

    Code:
    teenytransfertool.ino:
    
    /*
      TeensyTransfer Demo
      
      To make a USB RawHID device, use the Tools > USB Type menu  
    */
    
    
    #include <TeensyTransfer.h>
    
    const int FlashChipSelect = 6;
    
    void setup() 
    {
    
    //>>>UNCOMMENT THESE IF USING THE TEENSY AUDIO SHIELD
    
    //  SPI.setSCK(14);  // Audio shield has SCK on pin 14
    //  SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
    
    
    //>>>REMOVE unneeded / not connected devices here:
    
      eeprom_initialize();
      SerialFlash.begin(FlashChipSelect);
    
    }
    
    
    void loop() {
      ttransfer.transf
    }
    Last edited by KurtE; 07-22-2018 at 09:54 PM. Reason: code tags

  3. #3
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,838
    Re: compile errors

    you somehow deleted some of the last lines in teensytransfertool.ino ??? Get a fresh copy in the IDE from
    File > Examples > TeensyTransfer > teensytransfertool
    And before compiling and loading that sketch you must change the Tools > USB Type to Raw HID

    With teensytransfertool running, you should be able to run teensytransfer.exe from a command window.
    ./teensytransfer -i should give you info the SPI serial flashchip.
    Before creating files, you probably should erase the serial flash with ./teensytransfer -e

  4. #4
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    The fresh copy I got looks exactly the same. No additional lines.
    Am I getting the wrong copy?
    Ran again anyway, but still fails to compile because of: 'class TeensyTransfer' has no member named 'transf'

    This is where I am getting the sketch:
    -------
    https://github.com/FrankBoesing/Teen...sytransfertool
    TeensyTransfer/examples/teensytransfertool/teensytransfertool.ino
    a8efc12 on Apr 8, 2016

  5. #5
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,838
    I don't know where you're getting that? here's what I see there
    Code:
    /*
      TeensyTransfer Demo
      
      To make a USB RawHID device, use the Tools > USB Type menu	
    */
    
    
    #include <TeensyTransfer.h>
    
    const int FlashChipSelect = 6;
    
    void setup() 
    {
    
    //>>>UNCOMMENT THESE IF USING THE TEENSY AUDIO SHIELD
    
    //  SPI.setSCK(14);  // Audio shield has SCK on pin 14
    //  SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
    
    
    //>>>REMOVE unneeded / not connected devices here:
    
      eeprom_initialize();
      SerialFlash.begin(FlashChipSelect);
    
    }
    
    
    void loop() {
    	ttransfer.transfer();
    }

  6. #6
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    Yes, that's the same sketch. The way I copied it into my second message doesn't read as clearly as your boxed display. The spacing without indents maybe makes it look like lines are missing, but it's all there. I'll post any future code as you did to avoid confusion.
    The failed compile I still don't understand. What is 'class TeensyTransfer' has no member named 'transf' suggesting might be wrong?

    Compile error:
    -----------------
    Using library TeensyTransfer in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\TeensyTransfer (legacy)
    Using library SerialFlash at version 0.5 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SerialFlash
    Using library SPI at version 1.0 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SPI
    'class TeensyTransfer' has no member named 'transf'
    --------------------

  7. #7
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,838
    OK, my last try -- in your post #2 your sketch says
    Code:
    void loop() {
    ttransfer.transf
    }
    The actual library/github sketch says
    Code:
    void loop() {
    	ttransfer.transfer();
    }
    Hence the compile error for "transf"

  8. #8
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    Much appreciate your patience getting me to see the missing ();
    I was looking for a difference in the number of lines of code and didn't focus on the character detail.
    So now the compile gets further but still doesn't like 'ttransfer' (line 30)

    Compile Error:
    -------------------------------------------------------------------------------------
    C:\Users\larryc\AppData\Local\Temp\arduino_build_7 6159\sketch\teensytransfertool.ino.cpp.o: In function `loop':

    C:\Users\larryc\Documents\Arduino\teensytransferto ol/teensytransfertool.ino:30: undefined reference to `TeensyTransfer::transfer()'

    C:\Users\larryc\Documents\Arduino\teensytransferto ol/teensytransfertool.ino:30: undefined reference to `ttransfer'

    collect2.exe: error: ld returned 1 exit status


    Using library TeensyTransfer in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\TeensyTransfer (legacy)
    Using library SerialFlash at version 0.5 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SerialFlash
    Using library SPI at version 1.0 in folder: C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\SPI
    Error compiling for board Teensy 3.2 / 3.1.
    -------------------------------------------------------------------------------------

  9. #9
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,919
    That error is showing a typo in your sketch, not the library. rename ttransfer to transfer, its on line 30, or use CTRL+F to find it

    EDIT, nevermind I see it used in the demo...
    Is this the teensyduino copy your using or did you download the github library copy and using that?

  10. #10
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    tonton81

    The teensytransfertool.ino sketch I am trying to run (but fails to compile) is from github; link below:
    -------
    https://github.com/FrankBoesing/Teen...sytransfertool
    TeensyTransfer/examples/teensytransfertool/teensytransfertool.ino
    a8efc12 on Apr 8, 2016

    I am not aware of any other teensyduino copy.

  11. #11
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,838
    I'm a linux/macos type so am not as familiar with windows IDE mgt -- but i did confirm that i could build and run teensytransfertool on my wife's windows 10 desktop. Google suggests your ld error ("legacy") probably results from a bad install of TeensyTransfer library.

    Try removing the TeensyTransfer folder C:\Teensy\arduino-1.8.5-windows\arduino-1.8.5\hardware\teensy\avr\libraries\TeensyTransfer and downloading the .zip file from TeensyTransfer github https://github.com/FrankBoesing/TeensyTransfer, then using the IDE library manager (Sketch > Include Library > Add .ZIP Library) to install the zip file. (It should end up in your Documents\Arduino\libraries\)

    Another option: TeensyTransfer github has prebuilt HEX files of teensytransfertool in extras/ so you could download T32_teensytransfertool_with_SerFlash_CSPIN6.ino.he x and use the Teensy loader window to upload the HEX to your T3.2

  12. #12
    Junior Member
    Join Date
    Jul 2018
    Posts
    7
    That was it! It's working now. It was a bad TeensyTransfer library. Replaced library with your very clear directions and then teensytransfertool.ino compiled right away. AND my original issue, the 'communication error' when trying to run teensytransfer from the command prompt is FIXED. teensytransfer now has no problem talking to the Prop Shield. Thank you so much for all the help.
    Larry

  13. #13
    Junior Member
    Join Date
    Feb 2019
    Posts
    1

    I'm sooo stuck

    Quote Originally Posted by larrycalta View Post
    That was it! It's working now. It was a bad TeensyTransfer library. Replaced library with your very clear directions and then teensytransfertool.ino compiled right away. AND my original issue, the 'communication error' when trying to run teensytransfer from the command prompt is FIXED. teensytransfer now has no problem talking to the Prop Shield. Thank you so much for all the help.
    Larry
    I was very happy when I found this thread but after following everything nothing worked for me.
    I'm trying to load some raw sound clips https://learn.sparkfun.com/tutorials...ce-changer/all
    any help would be great.

Posting Permissions

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