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 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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