nRF51 SDK: Speed and Cadence

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

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

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 when using the PCA10003 ev-kit board or with nRF6310 with setup A. 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.

When using PCA10003 board this board only have two leds. SDM_GPIO_2 will not be connected to any LED, but could be monitored by a logic analyzer or such.

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

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 when using the PCA10003 ev-kit board or with nRF6310 with setup A. 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.

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.