This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to configure the clock pin for SPI flash memory on nrf51822

I'm pretty new with microcontrollers and SPI. I connected fisically an nrf51822 microcontroller to an external SPI flash memory. I connected MISO MOSI ports to some random P.xx pins of the microcontroller. I've trouble to understand to which pins should I connect the Clock . I've seen a CLK port on the microcontroller schema so i connected it to it. But now i've troubles to understand what this code should look like:

     spi_config.SPI_Pin_SCK  = SPIM0_SCK_PIN;
    spi_config.SPI_Pin_SS   = SPIM0_SS_PIN;

To which pin should correspond SPIM0_SCK_PIN constant and to which pin should correspond SPIM0_SS_PIN ? Also what is SPIM0_SS_PIN ?

Sorry. I'm a neophyte. Regards Claudio

Related