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

Thread: SD card not being detected or accessible on Teensy 4.0

  1. #1
    Junior Member
    Join Date
    Mar 2020
    Posts
    5

    SD card not being detected or accessible on Teensy 4.0

    Hello,

    For a project I would need to record I2S MEMS microphones data into a SD card to analyse it offline.
    For now I encounter some issues with the SD card.

    I'm using the T4 and an audio schield, just to do the tests I will then solder a SD port directly on the T4.
    My SD cards are a Samsung EVO Plus U1 and a SanDisk Extreme PLUS U3. Both are 32GB SDHC.

    I just ran exemple sketchs like the CardInfo with the SD.h library and the SdInfo with the SdFat library. I just set the chip select to 10.

    With both libraries the Samsung Card is not detected and the SanDisk is detected but not usable. For example in the SD.h CardInfo example I get "Could not find FAT16/FAT32 partition.Make sure you've formatted the card".

    Of course I formatted and refformated the card to a FAT32 partition.

    My best guess for now is that these SD cards are not compatible but I find it strange therefore I would like to have confirmation before ordering a new one.

    Thanks,

    Vuhian

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,497
    No, your SDcard should be fine fine.
    Q: how did you solder " SD port directly on the T4"?

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,106
    On the Audio card bottom silkscreen what is the printed letter for "Rev"?

    Only the "Rev D" board works properly when directly pinned to the T_4.0.

    Images and pin details are noted on this page: pjrc.com/store/teensy3_audio.html

    Not noted in post #1 :: what version of TeensyDuino is installed? Not sure when any relevant changes may apply - but the current version is TD 1.51 with a beta 1 for TD 1.52 is posted on the forum.

    This section at the start of setup() works here with a T_4.0 and REV D audio board.
    >> CS is set to 10
    >> The lines that modify SPI pins are left commented for this combination
    Code:
    const int chipSelect = 10;
    
    void setup()
    {
      //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD:
      //SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
      //SPI.setSCK(14);  // Audio shield has SCK on pin 14
    Output for my card shows FAT32::
    Code:
    Initializing SD card...Wiring is correct and a card is present.
    
    Card type: SDHC
    
    Volume type is FAT32
    
    Volume size (Kbytes): 15537664
    Volume size (Mbytes): 15173
    
    Files found on the card (name, date and size in bytes): 
    SYSTEM~1/     2020-02-23 11:28:20
      WPSETT~1.DAT  2020-02-23 11:28:20 12
      INDEXE~1      2020-02-23 11:28:20 76
    20200318.CSV  2000-01-01 01:00:00 80892
    DL200318.CSV  2000-01-01 01:00:00 210866
    SDTEST4.WAV   2019-06-30 16:54:10 17173152
    SDTEST1.WAV   2019-06-30 16:53:20 16787550
    SDTEST2.WAV   2019-06-30 16:53:52 16425698
    SDTEST3.WAV   2019-06-30 16:54:00 13617358
    I have another card formatted ExFAT and it still can see the card - just not the filesystem type:
    Initializing SD card...Wiring is correct and a card is present.

    Card type: SDHC
    Could not find FAT16/FAT32 partition.
    Make sure you've formatted the card

  4. #4
    Junior Member
    Join Date
    Mar 2020
    Posts
    5
    I did not do it yet. I'm using the Sd port on the audio shield for now. audio shield rev.D

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,106
    Quote Originally Posted by Vuhian View Post
    I did not do it yet. I'm using the Sd port on the audio shield for now. audio shield rev.D
    Unsoldered pins will give unreliable connections - if they work at all - more likely they will fail to work if unsoldered.

  6. #6
    Junior Member
    Join Date
    Mar 2020
    Posts
    5
    Thanks for your replies.
    I found the problem. I assumed that the two ground pins on the audio shield were connected together so I only connected one of them to the teensy.
    My bug was fixed when I connected the second one.

    Best,

    Vuhian

Posting Permissions

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