Skip to content

Sparkfun SAMD51 Thin PLus: SDCard + SPI #14347

Discussion options

You must be logged in to vote

This little script works here with a Sparkfun SAMD51 Things Plus and a simple SD card breakout. You do not have to initialize the Pin objects or the baud rate, because that will be done by sdcard.py. So you can as well write:
spi = SPI(1, sck="D13", mosi="D11", miso="D12"). Only cs must be provided as Pin object, but will be set up by the driver.

You can however specify a baudrate in the SDCARD constructor, which will be used by the driver. The highest value you can use with SAMD51 is 24MHz. I achieved a data rate of up to 0.5 MByte/s with 50k data blocks.

from machine import Pin, SPI
import sdcard
import os

if 1:
     # Configure the pins -- 3.3V(OUT) red / GND black
     SD_MOSI = Pin(…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@LeandroFernandes88
Comment options

@LeandroFernandes88
Comment options

@robert-hh
Comment options

Comment options

You must be logged in to vote
3 replies
@LeandroFernandes88
Comment options

@robert-hh
Comment options

@LeandroFernandes88
Comment options

Answer selected by LeandroFernandes88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
SAMD
Labels
None yet
2 participants