DZone
IoT Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > IoT Zone > FatFS With Adafruit MicroSD Breakout Board and NXP FRDM-KL25Z

FatFS With Adafruit MicroSD Breakout Board and NXP FRDM-KL25Z

See one particular configuration for a breakout board you can use for quick assistance on your projects.

Erich Styger user avatar by
Erich Styger
·
Aug. 10, 16 · IoT Zone · Tutorial
Like (1)
Save
Tweet
2.11K Views

Join the DZone community and get the full member experience.

Join For Free

Breakout boards are great. They allow me to explore functions quickly, without to build my custom board. All I need are some wires and, ideally, a bread board.

Adadfruit MicroSD Card Breakout Board

Adafruit MicroSD Card Breakout Board

Here is how I wire the Adafruit Micro SD card breakout board to the NXP FRDM-KL25Z board:

  • CD (Card detect) to PTD5.
  • CS (Chip select, slave select) to PTD0.
  • DI (Data In, MOSI) to PTD2.
  • DO (Data Out, MISO) to PTD3.
  • CLK (Clock) to PTD1.
  • GND (Ground) to GND.
  • 3V not connected, as this is the 3.3V regulator output of the breakout board.
  • 5V (power supply of the breakout board) to 5V.

The board includes a 3.3V level shifter as SD cards use 3.3V logic levels. With the level shifter and the onboard regulator that board can be used both with 3.3V and 5V microcontroller. With the FRDM-KL25Z which uses 3.3V logic levels, I power the board with 5V:

MicroSD Card Breakout Board Wiring Detail

MicroSD Card Breakout Board Wiring Detail

Below is a high-resolution image with the connections between the FRDM-KL25Z and breakout board:

MicroSD Card Breakout Board Wiring Detail

MicroSD Card Breakout Board Wiring Detail (Click to Enlarge)

An example project is available on GitHub here.

It uses the NXP Kinetis Design Studio V3.2.0 with Processor Expert, FreeRTOS, and FatFS:

FatFS Project


The above project can work with any other breakout board, considering the following:

  • MicroSD cards do not have a ‘write protection tab,’ so the write protection pin is not needed
  • Some cards have HIGH active card detection pin, some have LOW active levels. Tha Adafruit one is HIGH active:

Card Detection Pin

Card Detection Pin

This can easily be verified with the example project shell command:

Card Present status

Card Present status

Below is an example session with a terminal connected to the OpenSDA port with 38400 baud:

Example FatFS Session

Example FatFS Session

Breakout boards are great, and while there are many ones available on the market, I mostly use the ones from Adafruit. But if you are using a different SD or microSD card board, the project used in this article easily can be adapted to a different card. I hope this is useful for you too. Happy Breakouting.

Cards (iOS)

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Perform Visual Regression Testing Using Cypress
  • Flutter vs React Native. How to Cover All Mobile Platforms in 2022 With No Hassle
  • Making Machine Learning More Accessible for Application Developers
  • A Guide to Understanding Vue Lifecycle Hooks

Comments

IoT Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo