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

SPI Signals pinout

Hi.

I would like to route the BLE SPI signals to an external connector for use with external debugger.

Please specify which the nRf52832 pins are by default assigns to these signals:

1) SPI_MOSI(SDI)

2) SPI_MISO(SDO)

3) SPI_CLK

4) SWDIO

If I missed another signal please add

Thanks

Parents Reply Children
  • Hi again.

    Here is an example:

    Open up the main.c file in your SDK 15 folder, nRF5_SDK_15.0.0_a53641a\examples\peripheral\spi\main.c

    Under the main function you find the struct spi_config that defines which GPIO pins the SPI is configured to.

    The struct is the following code:

        nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
        spi_config.ss_pin   = SPI_SS_PIN;
        spi_config.miso_pin = SPI_MISO_PIN;
        spi_config.mosi_pin = SPI_MOSI_PIN;
        spi_config.sck_pin  = SPI_SCK_PIN;
        APP_ERROR_CHECK(nrf_drv_spi_init(&spi, &spi_config, spi_event_handler, NULL));

    Just change SPI_SS_PIN, SPI_MISO_PIN, SPI_MOSI_PIN, and SPI_SCK_PIN to the GPIO pins integers you found in the pin assignment.

    You can also open one of the project files found in nRF5_SDK_15.0.0_a53641a\examples\peripheral\spi\pca10040\blank and do the exact same thing.

    - Andreas

Related