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

Thread: Frustrating issues with SD card not working: Unable to find partition

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    7

    Frustrating issues with SD card not working: Unable to find partition

    Hello,

    I recently purchased a teensy 3.2 and the audio adaptor board. I have been unable to get the audio board to recognize any of the three micro sd cards I have tried despite all efforts. All three cards are SanDisk. One is an older 256 mb card (class unknown). The other two are both 32 gb class 10 SanDisks (one of which I purchased brand new today). I have read through many of the posts on here about issues with micro sd cards. I have made sure to erase duplicate instances of SD.h, I've reformatted each of the cards in every way possible (using both the windows 10 format function and the official SD Card Formatter application linked). No matter what I try, the Cardinfo sketch always says the same thing:

    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

    And I am unable to play audio files (tried both.WAV and .RAW) from the Examples audio tutorial sketch Part_1_03_PlayingMusic. I am at my wits end trying to figure out why this seemingly simple task will not work. I've used all three SD cards successfully with the DFRobot .mp3 player and the Adafruit VS1053 audio board.

    Any advice or suggestions about what I can do to get this board to read an SD card (or if anyone can tell me what I'm doing wrong) would be greatly appreciated. This is my first time using a teensy, so I readily admit that I may be making a very simple and obvious mistake somewhere. Thanks in advance for your help!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,882
    It might be that the Windows and the cards format programs now use a different file format than the original DOS FAT32 file system. Perhaps they are using NTFS or exFAT filesystems, which are generally better than the old FAT32 (and VFAT that uses the FAT32 format) system for large memory cards. If possible, see if the programs have an option to format the card as FAT32.

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Thanks for the suggestion. Windows 10 gives me the option to choose NTFS, exFAT, or FAT32. I've tried all three just for the heck of it. No luck at all.

    I did manage to find a fourth old SD card that Cardinfo is able to read. (Its far too small for my project, but it at least confirms that the audio board/teensy are working). After I saw that it worked, I plugged it into my computer and reformatted it in the exact same way as I did the three non-working cards. After reformatting, this one still works. Which leads me to believe that the formatting application isn't the problem (but I'm not 100% sure of that conclusion). Any other things to try?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,215
    Maybe the partition table is some newer type the SD library doesn't understand? (just a blind guess)

    The SD library only knows "MBR" partition type.

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    I appreciate the help, Paul. How could I test that?

    Should I replace the SD.h file with a more recently-updated version?

    Or, can you recommend an SD card (at least 16 gb) that you know works?

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,215
    Every SD card I've ever purchased between 128M to 32G has come pre-formatted as FAT16 or FAT32 with the correct partition table. All I've ever had to do is copy the files onto the card. I have never found any card in this size range which did not work "out of the box".

    For the audio tutorial, we buy Kingston 8GB cards. All have worked fine.

  7. #7
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Honestly, what should I do? Should I try to return/exchange the audio board/teensy? (I can't imagine how this could be a hardware defect, but you never know I guess...)

    I obviously don't want to just keep buying more and more SD cards to try. I'm at a complete loss here of what to try next.

  8. #8
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,244
    I remember an other User, long ago, who had this problems. It was a problem with the connections between Teensy/Audioshield. Please post some photos.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,215
    Quote Originally Posted by jimtom View Post
    I'm at a complete loss here of what to try next.
    Well, I'm at a loss too, since I can't see what you're doing. But I can tell you one thing that's admittedly expensive but I am absolutely sure will work: the audio tutorial. We do fully test those kits, including a brief listening test where we play a file from the SD card - so if you get that $60 tutorial kit, I can tell you with confidence it definitely will work with the included SD card.

    But from the info in your first message, this really does look like you're simply formatting or partitioning the card incorrectly. The really strange part is virtually all the cards on the market don't need formatting. They almost always come with a proper partition table and FAT32 filesystem.

    If the CardInfo test detects SDHC, that means your card did properly answer multiple commands to be detected. The hardware is almost certainly good.

  10. #10
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    OK, I think I figured something out. And Frank, you're definitely on the right track.

    I just pulled the teensy/audio board off my breadboard and reset the teensy while just holding it in my hand. Wouldn't you know it, now it can read the card. Plug the teensy back into the breadboard? It can't find the partition again. Definitely a hardware issue (most likely due to bad soldering, right?). Something is shorted somewhere.

    Edit: there's nothing else plugged into the breadboard besides the teensy/audio board stack. Just thought I should mention that fact
    Last edited by jimtom; 01-18-2019 at 08:03 AM.

  11. #11
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Here's some pictures. I had to trim some of the leads off the stackable headers so that it would fit on the breadboard. Sparkfun's header kit came with two long rows of 13 pins each, so I had to use the cross piece on the end too (if that makes sense). My soldering technique is definitely poor, at least on the audio board...

  12. #12
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,215
    Looks like pin 12 will get shorted to VBAT when this plugs into a solderless breadboard.

    Click image for larger version. 

Name:	pins.jpg 
Views:	7 
Size:	28.7 KB 
ID:	15638

    VBAT goes to a diode, but it's a large schottky diode (with high capacitance when reverse biased, and connected to a 0.1uF capacitor when forward biased). There's a good chance the card can work at the slow clock speed used for hardware detection. But at the fast 24 MHz SPI clock speed used after detection, the VBAT capacitive load is likely to interfere with data from the card to Teensy.

  13. #13
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Wow, I don't know how I missed the fact that those pins will be connected on the breadboard... sometimes its the simplest things that cause the most problems... I've trimmed those pins, and everything is working as it should now.

    Thanks again for the help everyone.

Posting Permissions

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