0

I need to interface with a micro SD card in SPI mode, and the datasheet says that the serial clock speed should be between 100 and 400 kHz. So I connected it to the 23rd pin but I can not find any library that makes me set such a frequency on that pin.

Maybe I could connect the SCLK pin on the SD controller to the PWM pin on Raspberry?

I'm looking forward on using pigpio library in C, which seems the best for what I'm working on...

1

SCLK is the SPI serial clock and will be generated by the SPI hardware.

You just need to specify an appropriate speed with the library you use.

In pigpio terms that would be something along the following lines:

h = spiOpen(0, 400000, 0); /* open SPI channel 0 at 400 kbps, mode 0 */

spiOpen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.