nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Speed and Cadence

Receiver

The Stride and Distance Monitor (SDM) slave implements all of the features, which are required for the receiver to be compliant with the ANT+ SDM profile, as defined by the ANT+ SDM specification:

  • Must be able to receive and decode the minimum dataset sent from the master.
    • Receive and decode data page 1 and 2
    • Receive and decode common page 80 and 81
  • Do not support requesting pages (page 70)
  • Receive and decode cadence field in page 1
  • Calculate the accumulated stride count

The process flow of the SDM RX example is illustrated below:

sdm_rx_flowchart.png
SDM RX flowchart
Logging

For logging UART will be the primary display. Data will be printed after broadcast data is received. Depending on the page received, the following data will be logged:

  • Current stride count.
  • Accumulated stride count.
  • Cadence.
  • Device status byte.
  • Manufacturer identification.
  • Product information.
  • Protocol RX failure.

The logging with UART will be enabled by default in the project file. This can be deactivated by removing TRACE_UART from the compiler flags. When deactivated the data processing function will not be included in the compilation, as there are no need to interpret the data received, when we can not display the information.

As UART will use some extra current, a low power alternative is also available, using GPIO. By default the GPIO pins are connected to LEDs. Also GPIO logging is enabled by default by the project file. This can be deactivated by removing TRACE_GPIO from the compiler flags. The GPIO pins to be used can be changed by editing the GPIO defines.

When GPIO logging is enabled the following GPIO will toggle:

  • SDM_GPIO_0 will toggle for every data page received.
  • SDM_GPIO_1 will toggle for every common page received.
  • SDM_GPIO_2 will toggle when we have a protocol RX failure.

The name of the example for PCA10028 is ant_sdm_rx_pca10028, and for PCA10031 it is ant_sdm_rx_pca10031. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\Nordic\nrf51\examples\ant\ant_sdm\sdm_rx

Note
The ANT+ Network Key is available for ANT+ Adopters. Please refer to http://thisisant.com to become an ANT+ Adopter and access the key.

Transmitter

The Stride and Distance Monitor (SDM) master implements all of the features, which are required for the transmitter to be compliant with the ANT+ SDM profile, as defined by the ANT+ SDM specification:

  • Must transmit the minimum dataset:
    • Transmit byte 6 of page 1 (stride count).
    • Transmit common page 80 and 81.
  • Common page will be transmitted every 65th message.
  • All pages will be transmitted two times in sequence in order to support 2.xx Hz ANT products.
  • Silently discard page request 70.
  • Update stride data every 1 second.

The process flow of the SDM TX example is illustrated below:

sdm_tx_flowchart.png
SDM TX flowchart
Logging

For logging UART will be the primary display. Data will be printed after broadcast data is set. Depending on the page transmitted, the following data will be logged:

  • Current stride count.
  • Device status byte.
  • Manufacturer identification.
  • Product information.

The logging with UART will be enabled by default in the project file. This can be deactivated by removing TRACE_UART from the compiler flags.

As UART will use some extra current, a low power alternative is also available, using GPIO. By default the GPIO pins are connected to LEDs. Also GPIO logging is enabled by default by the project file. This can be deactivated by removing TRACE_GPIO from the compiler flags. The GPIO pins to be used can be changed by editing the GPIO defines.

When GPIO logging is enabled the following GPIO will toggle:

  • SDM_GPIO_0 will toggle for every data page sent.
  • SDM_GPIO_1 will toggle for every common page sent.

The name of the example is ant_sdm_tx_pca10028. If you are not using the Keil Pack Installer, you can find the source code and project file of the example in the following folder: <InstallFolder>\Nordic\nrf51\examples\ant\ant_sdm\sdm_tx

Note
The ANT+ Network Key is available for ANT+ Adopters. Please refer to http://thisisant.com to become an ANT+ Adopter and access the key.