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

Thread: Teensy 3.5 SD-Card - mechanical issue?

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Posts
    14

    Teensy 3.5 SD-Card - mechanical issue?

    Hello!

    I am using <SdFat.h> in a project to read a config.txt.
    This worked well and I handed it over to a customer. Now it is not working anymore but the code was not changed.
    Code:
    sd.begin(SD_CONFIG);
    with
    Code:
    SD_CONFIG SdioConfig(FIFO_SDIO);
    returns false.

    My guess is that it is a problem with the SD-Card reader? Is this a know issue?


    Have a nice day

    Schlank

  2. #2
    Member
    Join Date
    Aug 2018
    Location
    Brisbane, Australia
    Posts
    79
    Did you try a different SD card yet? Just to confirm that the SD card itself is not fubar

  3. #3
    Junior Member
    Join Date
    Sep 2020
    Posts
    14
    Yes tried different ones all formatted with the SD formatter tool.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,215
    SdFat with SdioConfig(FIFO_SDIO) definitely works. No known issues there.

    Teensyduino 1.54 started including SdFat 2.05. Versions 1.53 and earlier didn't include any copy of SdFat, but of course it was always possible to install SdFat yourself and use it. If you're using 1.54 and your code was developed using an older version of SdFat, perhaps something else about your code than these 2 lines somehow depends on an earlier version? I hope you can see this is straying pretty far from known issues into sheer guesswork about your code and even which version of the software and SdFat library you're actually using.

    In Arduino, click Help > About to check which version of Teensyduino. In File > Preferences, you can enable verbose output during compilation. Then when you compile, Arduino will tell you the exact path of the SdFat library it actually used, and if you have any other copies it ignored, it will tell you about those. This info can be critically important if you have a compatibility issue with a new vs old version of SdFat, and both happen to be installed on your computer in different folders!

  5. #5
    Junior Member
    Join Date
    Sep 2020
    Posts
    14
    Hi!
    I am using Teensyduino 1.53 and compiler tells me about this Version:

    Alternatives for SdFat.h: [SdFat@2.0.5]
    ResolveLibrary(SdFat.h)
    -> candidates: [SdFat@2.0.5]

    Should I update to 1.54?

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,215
    Maybe first click File > Examples > SD > listfiles. Edit the chip select pin to BUILTIN_SDCARD (refer to the comments for details).

    At least run that known-good example to check whether it can access your SD card.

  7. #7
    Junior Member
    Join Date
    Sep 2020
    Posts
    14
    It was (as often) a stupid bug: in the folder was a hidden file and the code tried to open this file and not the config.txt
    Working with SD-Cards can be nasty!

    But thanks for you quick reply!

  8. #8
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,362
    I'd advise always disabling file-hiding in any OS you use, otherwise it will bite you one day.

Posting Permissions

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