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

Thread: Problems using sdFat

  1. #1
    Member
    Join Date
    Mar 2021
    Location
    Oceanside, CA
    Posts
    20

    Problems using sdFat

    I'm basically a neophite although I have at least one project I'm pretty happy with. That project, however, is plagued by write latency issues with the SD card on a Teensy 3.5. I would like to try using sdFat instead of SD to see if that results in any improvement but nothing seems to work.

    Actually the Bench example works having made two changes set USE_SDIO to 1 and chipSelect to 254 works:
    #define USE_SDIO 1
    const uint8_t chipSelect = 254;

    Other examples don't work. For instance with the simple ReadWrite example: As-is it fails to initialize the card. If I change "#define SD_CS_PIN SS" to "#define SD_CS_PIN BUILTIN_SDCARD" it is undeclared. If I change it to 254 it runs but fails to initialize the card.

    EDIT: Now I'm even more frustrated. After updating to the latest sdFat version 2.0.5 even the edited Bench example mentioned above fails to compile with errors listed below.

    Can anyone offer any suggestions on using sdFat with a Teensy 3.5? Examples that work? Or perhaps a reference for the sdFat classes similar to the sd reference? (https://www.arduino.cc/en/reference/SD)

    Code:
    Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Teensy 3.5, Serial, 120 MHz, Faster, US English"
    
    Card_Test:39: error: 'SdFatSdioEX' does not name a type
    
     SdFatSdioEX sd;
    
     ^
    
    Card_Test: In function 'void cidDmp()':
    
    Card_Test:63: error: 'sd' was not declared in this scope
    
       if (!sd.card()->readCID(&cid)) {
    
            ^
    
    Card_Test: In function 'void loop()':
    
    Card_Test:117: error: 'sd' was not declared in this scope
    
       if (!sd.begin()) {
    
            ^
    
    Card_Test:127: error: 'sd' was not declared in this scope
    
       cout << F("Type is FAT") << int(sd.vol()->fatType()) << endl;
    
                                       ^
    
    Multiple libraries were found for "SdFat.h"
    
     Used: C:\Users\Rick\Documents\Arduino\libraries\SdFat
    
     Not used: C:\Users\Rick\Documents\Arduino\libraries\arduino_47876
    
    'SdFatSdioEX' does not name a type
    
    
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,122
    To use SdFat on Teensy - use the TeensyDuino 1.54 Beta 7.

    The prior SD included has been replaced with current SdFat 2.0 Beta release.

    Using any current SD feature should be mapped into the SdFat library with improved performance thanks to PJRC.

    To see install the TD 1.54 Beta 7 and report issues on that thread.

Posting Permissions

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