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

SPI pin on nrf51 DK

Hi All,

I have a question about the SPI pin number on nrf51 Dk.

I don't understand when i look into the pca10028.h file, i see this mapping:

#define SPIM0_SCK_PIN       4
#define SPIM0_MOSI_PIN      1
#define SPIM0_MISO_PIN      3
#define SPIM0_SS_PIN        2

But when i look into the nrf_drv_config.h file , i see this:

#if (SPI0_ENABLED == 1) #define SPI0_USE_EASY_DMA 0

#define SPI0_CONFIG_SCK_PIN 2 #define SPI0_CONFIG_MOSI_PIN 3 #define SPI0_CONFIG_MISO_PIN 4 #define SPI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW

I don't understand what is SPI0_CONFIG_SCK_PIN, SPI0_CONFIG_MOSI_PIN and SPI0_CONFIG_MISO_PIN and why the pin mapping is not the same to pca10028.h ??

Thanks for your clarification.

Parents Reply
  • Are you sure ?

    I tested the SPI Master LoopBack example and it is the pins defined in the bsp.h file who are used for SPI... Not those in the nrf_drv_config.h

    Can you test the example in the SDK 10 ? connect pin 1 and 3 for SPI0, and 12 and 14 for SPI1 and it works.

    But if you look in the nrf_drv_config, you can see the SPI0 and SPI1 are enabled and the pin mapping is the same: pin 2 3 and 4.

    I don't understand. Thanks.

Children
No Data
Related