nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SPI slave example

The SPI slave example has been created specifically for verifying the SPI connectivity link against the SPI master example application. The SPI slave example can only be used with a nRF51822 Development Kit board that is running the SPI slave example application. The application uses the LEDs to indicate the status of the SPI transaction.

Setup

Instructions on how to set up the nRFgo Motherboard: nRFgo Motherboard Setup (nRF6310).

Used SPI slave pin configurations:

  • MOSI (Pin 22, P2.6).
  • MISO (Pin 20, P2.4).
  • CSN (Pin 21, P2.5).
  • SCK (Pin 23, P2.7).

LED assignments:

  • LED 0 is used to show that an application is running.
  • LED 1 is toggled everytime a single SPI transaction has completed successfully.
  • LED 2 is used to show if an error has occurred.

Testing

The example application can be tested as follows:

  1. Connect 2 nRF51822 Development Kit boards using SPI together.
  2. Compile and program the applications (SPI slave example and the corresponsing SPI master example).
  3. Observe that the LED 0 is lit and LED 1 is toggled every 100ms on the board running the SPI slave example.