Logo
SPARK Microsystems SDK v2.4.0
  • Introduction
  • Features
  • Getting Started
    • Preferred Integrated Development Environment (IDE)
    • Prerequisites
      • VS Code Extensions
      • Hardware
    • Create the Virtual Environment with VS Code
    • Building Applications
    • Flashing an EVK
      • Setting up an EVK’s DFU Mode driver
      • Putting an EVK in DFU Mode
      • Flashing
    • Debugging with ST-Link Debug Probes
    • Viewing the Terminal
    • Time to Explore
  • Structure Overview
  • Hardware Description
  • Applications
    • Example
      • Audio Bidirectional
        • Description
        • Behavior
          • Audio Configuration
          • Audio Interface
          • Application Schedule
          • Pairing
          • Fallback
          • Clock Drift Compensation (CDC)
          • Board User Interface
        • Certification
          • Activating the Certification Mode
        • Terminal
        • Latency Breakdown
      • Audio Unidirectional
        • Description
        • Behavior
          • Audio Configuration
          • Audio Interface
          • Application Schedule
          • Pairing
          • Fallback
          • Clock Drift Compensation (CDC)
          • Coordinator User Interface
          • Node User Interface
        • Certification
          • Activating the Certification Mode
        • Terminal
        • Latency Breakdown
      • Connection Priority
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Data exchange
            • Link Capacity Utilization
          • Coordinator User Interface
          • Node User Interface
        • Certification
        • Terminal
      • Datalink
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Coordinator User Interface
          • Node User Interface
        • Certification
        • Terminal
      • Fragmentation
        • Description
          • Fragmentation
          • Auto-Reply
        • Application Data Flow
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Certification
        • Terminal
      • Hello World
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Certification
        • Terminal
      • Hello World RTOS
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Certification
        • Terminal
      • Puretone Headset
        • Description
        • Behavior
          • Audio Configuration
          • Audio Interface
          • Application Schedule
          • Pairing
          • Fallback
            • Main Channel Fallback
              • Fallback Mode 1 - 48kHz/24-bit Uncompressed
            • Fallback Mode 2 - 48kHz/16-bit Uncompressed
            • Fallback Mode 3 - 48kHz ADPCM
            • Back Channel Fallback
          • Clock Drift Compensation (CDC)
          • Variable Audio Latency per Fallback Mode
          • Board User Interface
        • Certification
          • Activating the Certification Mode
        • Terminal
        • Latency Breakdown
      • Puretone Unidirectional
        • Description
        • Behavior
          • Audio Configuration
          • Audio Interface
          • Application Schedule
          • Pairing
          • Fallback
            • Main Channel Fallback
            • Fallback Mode 1 - 48kHz/24-bit Uncompressed
            • Fallback Mode 2 - 48kHz/16-bit Uncompressed
            • Fallback Mode 3 - 48kHz ADPCM
          • Clock Drift Compensation (CDC)
          • Variable Audio Latency per Fallback Mode
          • Board User Interface
        • Certification
          • Activating the Certification Mode
        • Terminal
        • Latency Breakdown
      • Star Network
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Coordinator User Interface
          • Node 1 User Interface
          • Node 2 User Interface
        • Certification
        • Terminal
    • Wireless Core API Access
    • Tools
    • QSPI Configuration
    • Dual Radio Configuration
    • USB Audio Support
  • Cores
    • Audio Core
      • Introduction
      • End-User Application
      • Audio Core Components
        • Audio Pipeline
          • Audio Endpoint
          • Audio Processing Stage
            • Clock Drift Compensation
            • Audio Compression
            • Audio Fallback
            • Mute on Underflow
            • Mute Packet
            • Audio Packing
            • Sampling Rate Converter
            • Digital Volume Control
            • Audio Sample Accumulator
        • Audio Header
        • Audio Mixer
      • Latency
        • Audio Latency
          • Initial Buffering
          • Pipeline Stages
          • Processing Stage Latency
          • System Latency Overhead
          • Capture Latency by Endpoint Type
          • Packet Duration
          • TX Buffering
          • Total Audio Latency Formulas
          • Overflow Detection
          • Suggested RX Queue Depth
          • Retransmission Jitter Absorption
          • Buffer as Burst-Bridge
            • Schedule design (retransmission margin)
            • Buffer sizing (burst tolerance)
            • Combined view: puretone_unidirectional fallback modes
            • Diagnostics
          • Buffering Rule of Thumb
      • References
    • Wireless Core
      • Introduction
      • Concepts
        • Time Division Multiple Access
        • Network
        • Schedule
        • Frequency Switching
        • Addressing
          • PAN ID
          • Node Address
          • PAN Broadcast
        • Connection
        • Timeslot Ownership
        • Remote Node
        • Channel
        • Stream Types
        • Auto-Reply
        • Timeslot Events
          • Main Frame Transmission
          • Auto-Replied ACK
          • Auto-Replied Payload
        • Synchronization Methods
          • Standard Sync
          • Fast Sync
        • Dual Radio
          • Hardware Requirements
          • Certification
        • Topology
          • Star Network Topology
          • Peer-to-Peer Network Topology
          • Cluster Tree Network Topology
        • Concurrency
          • Personal Area Network ID (PAN ID)
          • Channel Sequence Randomization
          • Clear Channel Assessment (CCA)
          • Random Datarate Offset Protocol (RDO)
          • Distributed De-Synchronization Concurrency Algorithm (DDCM)
        • Sleep Modes
        • Modulation
        • Symbol Averaging / Chip Repetition
        • Forward Error Correction (FEC) Ratio
        • Inter-Symbol Interference (ISI) mitigation
        • Over-The-Air Chip Rate
        • Stop and Wait
        • Credit-Based Flow Control
        • Frame Fragmentation
        • Fallback Mode
        • Link Throttling
          • Limitations
          • Complete Example
        • Connection Priority
        • Auto-Sync
        • Latency optimization
        • Frame Structure
          • Data frames
          • Sync frames
          • Acknowledgement frames
          • Header Configuration
        • Certification Mode
        • Data Validation
          • CRC
          • Address filtering
          • SFD match
          • Max frame size
      • MCU Requirements
        • MCU Footprint
          • Memory
          • CPU
      • Schedule Design Consideration
        • Bandwidth
          • Worked Example: Bidirectional Hello World (31-byte payload)
        • Retransmission Margin
        • Connection Priority and Timeslot Sharing
        • Star Network Scaling
        • Sync Timeslot (Beacon)
        • Concurrency Considerations
          • CCA Retry Delay Quantization
        • Latency
        • Packet Airtime
        • Fragmentation Impact
        • Timeslot Sizing
        • Schedule Design Trade-off
      • Latency
        • Wireless Latency
          • Components
          • Formulas
          • Non-Deterministic Nature
          • Inter-Opportunity Gap
          • Optimized Latency Feature
          • Initial Connection Latency (Fast Sync)
          • CCA Timing
          • Post-RX Decode Time
          • ACK Turnaround Time
          • RX Processing Time
          • Priority Blocking
          • Retransmission Impact (Stop-and-Wait ARQ)
          • Throttling
          • Fragmentation
          • Worked Example: Bidirectional HID (64-byte payload)
      • UWB Certification
        • UWB Certification
          • SDK examples
          • Certification Application Note
      • Power Saving Strategies
        • Power Consumption Optimizations
      • References
  • Modules
    • Spark Pairing Module
      • Pairing Procedure
        • Pairing Phases
        • Authentication Phase
        • Identification Phase
        • Addressing phase
      • Pairing Module Wireless Configuration
      • References
  • API Reference
    • Audio Core API
      • Initialization
        • Audio Core Configuration
        • Audio Pipeline Configuration
        • Audio Endpoint Configuration
      • Statistics
      • Reference
        • sac_api.h
        • sac_error.h
        • sac_stats.h
        • sac_utils.h
    • Wireless Core API
      • Initialization
        • Wireless Core Configuration
          • timeslot_sequence
          • timeslot_sequence_length
          • channel_sequence
          • channel_sequence_length
          • concurrency_mode
          • memory_pool
          • memory_pool_size
          • chip_rate
          • pan_id
        • Wireless Node Configuration
          • role
          • coordinator_address
          • local_address
          • isi_mitig
          • dynamic_phy_mode_enabled
        • Concurrency Configuration
          • random_channel_sequence_enabled
          • rdo_enabled (Core)
          • ddcm_enabled
        • Wireless Radio Module Initialization
          • Usage Scenarios
          • Calibration
          • IRQ Polarity
          • SPI Mode
        • Wireless Connection Configuration
          • name
          • source_address
          • destination_address
          • max_payload_size
          • queue_size
          • timeslot_id
          • timeslot_count
        • Wireless Beacon Connection Configuration
        • Wireless Channel Configuration
          • frequency
          • tx_pulse_count
          • tx_pulse_width
          • tx_pulse_gain
          • rx_pulse_count
        • Enable Fast Synchronization
        • Enable Certification mode
        • Configure Sleep Level
          • Configure FEC Ratio
          • Configure Modulation
          • Configure Auto Synchronization
          • Configure Latency Optimization
          • Configure Fragmentation
        • Configure Credit Flow
          • Configure Throttling
        • Enable Connection Priority
          • Configure Acknowledgement
          • Configure Retransmissions
          • Configure Clear Channel Assessment
            • swc_connection_concurrency_cfg.enabled
            • swc_connection_concurrency_cfg.try_count
            • swc_connection_concurrency_cfg.retry_time
            • swc_connection_concurrency_cfg.fail_action
        • Configure Fallback
          • enable
          • fallback_mode_count
          • threshold
          • cca_try_count
          • swc_connection_set_fallback_channels
          • Legacy API (not recommended)
        • Change Remote Node Destination Address
        • Wireless Status
      • Callbacks
        • TX Success
        • TX Fail
        • TX Dropped
        • RX Success
        • Event Callback
          • Connect Event
          • Disconnect Event
          • Error Event
        • Low Power Callback
      • Sending Data
      • Receiving Data
      • Statistics
      • Dynamic parameter change
        • Dynamically Change PHY mode (PHY rate and ISI mitigation)
      • Radio NVM
        • Formatted Output
        • Serial Number
        • Product Model
        • Product Version
      • Low Power Mode
      • References
        • SR1000
          • swc_api.h
          • swc_def.h
        • SR1100
          • swc_api.h
          • swc_def.h
        • swc_error.h
        • swc_stats.h
        • swc_utils.h
    • Pairing Module API
      • Pairing Usage
      • Pairing Configuration
      • Pairing Assigned Address
      • Pairing Discovery List
      • Device Role
      • Pairing Error
      • Pairing Events
      • Pairing Application Callback
      • Pairing Abort
      • Timeout
      • Application Code
      • Unique ID
      • Pairing Address Generation
      • References
        • pairing_api.h
    • EVK1.4 BSP
      • Introduction
      • IRQ Priority Scheme
      • Reference
        • evk.h
        • evk_audio.h
        • evk_button.h
        • evk_clock.h
        • evk_dbg.h
        • evk_def.h
        • evk_flash.h
        • evk_it.h
        • evk_led.h
        • evk_power.h
        • evk_radio.h
        • evk_timer.h
        • evk_uart.h
        • evk_usb.h
    • Quasar BSP
      • Introduction
      • IRQ Priority Scheme
      • Reference
        • quasar.h
        • quasar_adc.h
        • quasar_audio.h
        • quasar_button.h
        • quasar_clock.h
        • quasar_debug.h
        • quasar_def.h
        • quasar_dma.h
        • quasar_fifo.h
        • quasar_gpio.h
        • quasar_i2c.h
        • quasar_it.h
        • quasar_led.h
        • quasar_memory.h
        • quasar_power.h
        • quasar_pwm.h
        • quasar_radio.h
        • quasar_rgb.h
        • quasar_spi.h
        • quasar_timer.h
        • quasar_timer_ext.h
        • quasar_uart.h
        • quasar_usb.h
  • Development Environment
    • Prerequisites
    • Recommended Extensions
    • Creating a New Application Alongside the Example Applications
    • Build System
      • SDK Release Static Libraries
      • CMake External Resources
  • Porting Guide
    • Articles
      • Project Guidelines
        • Best Practices
        • Advantages
        • Migrating from the Previous SDK Architecture
          • Prebuilt Library Variants
        • Debugging Release Package Builds
        • Porting to Non-CMake IDEs
          • ABI and FPU Compatibility
      • Hardware Platform Requirements
        • MCU Resources
        • MCU Performance
      • Facades and Backends
        • Facades
        • Backends
        • Working with Facades and Backends
          • List of Components with Facades
          • Hello-World Porting Example
        • CMake Architecture and Dependencies
      • SPARK Wireless Core
        • Implement the backend
          • Context Switching and Interrupt Management
          • SPI/QSPI Communication
          • GPIO Controls for Radios
          • Timer and Delay Management
          • Dual Radio Timer Management
        • Provide a context switch mechanism
          • In a bare-metal environment
          • In an RTOS environment
      • SPARK Audio Core
        • Implement the Backend
          • Implement the Endpoint Interface
      • SPI Implementation
      • BSP Validator
        • Description
        • Terminal
      • Profiler
        • Description
        • Using Processing Time to Optimize Timeslot Configuration
          • Scenario 1: Unidirectional Transmission Link
          • Scenario 2: Unidirectional Reception Link
          • Scenario 3: Bidirectional Link
          • Summary
        • Terminal
      • Porting Optimizations
        • Introduction
        • Instruction Cache
        • Core-Coupled-Memory
          • Memory Layout
          • Modifying the Linker Script
          • Copying from Flash to CCMRAM
          • Adding User Functions to CCMRAM
        • GCC Optimizations
          • Using the -Ox Flag
          • Removing the -fno-omit-frame-pointer Flag
        • Data Synchronization
        • SPI optimizations
      • Porting Checklist
        • 1 - Implement the BSP for a Custom User Board
        • 2 - Implement the Backend for the SPARK Wireless Core Facade
        • 3 - Implement the Backend for the SPARK Audio Core Facade
        • 4 - Implementing the Backend for the SDK Application
          • SDK’s structure guidelines
          • Facade Functions to Implement
  • Changelog
    • v2.4.0 - 2026-07-24
      • Highlights
      • General
      • Applications
      • Documentation
      • Wireless Core
      • Audio Core
      • EVK1.4 BSP
      • Drivers
      • Libraries
      • Modules
    • v2.3.0 - 2026-02-24
      • General
      • Applications
      • Documentation
      • Wireless Core
      • Audio Core
      • Quasar BSP
      • EVK1.4 BSP
      • Libraries
      • Modules
      • Middleware
      • Virtual Environment
      • Toolchain
    • v2.2.0 - 2025-08-28
      • General
      • Applications
      • Documentation
      • Wireless Core
      • Audio Core
      • Quasar BSP
      • EVK1.4 BSP
      • Libraries
      • Modules
      • Middleware
      • Third-Party
    • v2.1.1 - 2025-06-16
      • Wireless Core
    • v2.1.0 - 2025-04-28
      • Applications
      • Documentation
      • Wireless Core
      • Audio Core
      • Quasar BSP
      • EVK1.4 BSP
      • Drivers
      • Libraries
      • Modules
      • Middleware
      • Virtual Environment
      • VS Code
      • Toolchain
    • v2.0.0 - 2024-10-01
      • General
      • Documentation
      • Wireless Core
      • Audio Core
      • Quasar BSP
      • EVK1.4 BSP
      • Drivers
      • Libraries
        • Archive
          • Changelog (Pre-2.0)
            • SDK
              • v1.3.1 - 2024-09-17
              • v1.3.0 - 2023-12-20
              • v1.2.1 - 2023-10-18
              • v1.2.0 - 2023-05-31
              • v1.1.0 - 2022-11-30
              • v1.0.1 - 2022-06-16
              • v1.0.0 - 2022-05-27
              • v0.12.0 - 2022-03-03
              • v0.11.0 - 2022-02-04
              • v0.10.0 - 2021-12-13
              • v0.9.0 - 2021-11-09
              • v0.8.0 - 2021-09-30
            • SPARK Cores
              • Audio Core Changelog (Legacy)
                • v0.9.0 - 2023-12-08
                • v0.8.0 - 2023-05-31
                • v0.7.0 - 2022-11-30
                • v0.6.0 - 2022-05-27
                • v0.5.0 - 2022-03-03
                • v0.4.0 - 2022-02-04
                • v0.3.0 - 2021-12-13
                • v0.2.0 - 2021-11-09
                • v0.1.0 - 2021-09-30
              • Wireless Core Changelog (Legacy)
                • v0.9.0 - 2023-12-08
                • v0.8.1 - 2023-10-18
                • v0.8.0 - 2023-05-31
                • v0.7.0 - 2022-11-30
                • v0.6.1 - 2022-06-16
                • v0.6.0 - 2022-05-27
                • v0.5.1 - 2022-04-19
                • v0.5.0 - 2022-03-03
                • v0.4.0 - 2022-02-04
                • v0.3.0 - 2021-12-16
                • v0.2.0 - 2021-11-09
                • v0.1.0 - 2021-09-30
            • Misc
              • EVK BSP Changelog (Legacy)
                • v0.8.1 - 2023-12-08
                  • v0.8.0 - 2023-05-31
                  • v0.7.0 - 2022-11-30
                  • v0.6.1 - 2022-06-16
                  • v0.6.0 - 2022-05-27
                  • v0.5.0 - 2022-03-03
                  • v0.4.0 - 2022-02-04
                  • v0.3.0 - 2021-12-13
                  • v0.2.0 - 2021-11-09
                  • v0.1.0 - 2021-09-30
              • SPARK Drivers Changelog (Legacy)
                • v0.6.0 - 2022-11-30
                • v0.5.0 - 2022-05-27
                • v0.4.0 - 2022-02-04
                • v0.3.0 - 2021-12-13
                • v0.2.0 - 2021-11-09
                • v0.1.0 - 2021-09-30
              • SPARK Libraries Changelog (Legacy)
                • v0.6.0 - 2022-11-30
                • v0.5.0 - 2022-05-27
                • v0.4.0 - 2022-02-04
                • v0.3.0 - 2021-12-13
                • v0.2.0 - 2021-11-09
                • v0.1.0 - 2021-09-30
  • Glossary
    • Audio Core Glossary
    • Wireless Core Glossary
SPARK Microsystems SDK
  • »
  • Applications »
  • Datalink

Datalink

Description

The datalink application presents a standard and basic usage of the SPARK Wireless Core. This is a good starting point for anyone wanting to configure wireless communication using the Wireless Core. This application creates a synchronized unidirectional link between 2 devices to send data after a successful pairing.

Behavior

In this example, wireless communication is halted until both devices are paired. Once successfully paired, the Coordinator transmits random data, which incorporates a sequence number and a Cyclic redundancy check (CRC). The Node will verify that the sequence number and CRC are valid.

Application Schedule

The following diagram illustrates the general structure of the schedule used in this application.

Datalink schedule

Figure 19: Datalink Application’s Schedule.

Pairing

On boot, devices attempt to pair automatically. If unsuccessful, manual pairing can be performed afterward to use the application.

Auto Pairing:
  • On boot, devices automatically start the pairing process. RGB blinks blue twice to indicate that pairing is in progress.

  • If the pairing procedure is unsuccessful, RGB blinks red twice after 10 seconds.

  • Once successfully paired, RGB turns magenta, and the devices begin exchanging application data.

Manual Pairing:
  • Press the SW1 button on both devices to start the pairing procedure; RGB blinks blue twice when doing so.

  • If the pairing procedure is unsuccessful, RGB blinks red twice after 10 seconds.

  • Once successfully paired, RGB turns magenta, and the devices begin exchanging application data.

Unpairing:
  • When paired, pressing the SW1 button again unpairs the device; RGB blinks red twice to indicate that unpairing has been completed.

  • Unpairing causes the devices to forget their learned addresses. The devices are no longer able to exchange application data.

  • To start a new pairing procedure, both devices must be unpaired first.

Note

LED behavior changes in pairing mode versus normal execution mode. During pairing mode, LEDs indicate pairing status as described below. Once paired, LEDs indicate packet transmission and reception and fallback mode status.

Auto Pairing:
  • On boot, devices automatically start the pairing process. LED0 blinks twice to indicate the pairing is in progress.

  • If the pairing procedure is unsuccessful, all LEDs blink twice after 10 seconds.

  • Once successfully paired, LEDs turn on sequentially, then turn off, and the devices begin exchanging application data.

Manual Pairing:
  • Press and hold the SW1 button on both devices for 3 seconds to start the pairing procedure; LED0 blinks twice when doing so.

  • If the pairing procedure is unsuccessful, all LEDs blink twice after 10 seconds.

  • Once successfully paired, LEDs turn on sequenstially, then turn off, and the devices begin exchanging application data.

Unpairing:
  • When paired, press and hold the SW1 button for 3 seconds to unpair the device; All LEDs blink twice to indicate that unpairing has been completed.

  • Unpairing causes the devices to forget their learned addresses. The devices are no longer able to exchange application data.

  • To start a new pairing procedure, both devices must be unpaired first.

Coordinator User Interface

  • LED1 toggles every time a packet is successfully transmitted to the Node (almost always on because of the high packet rate).

Table 21: Coordinator User Interface Description

Interface

Name

Description

SW1

Pairing Process

Pair, unpair, or abort the pairing process depending on the current state.

SW2

Reset Stats

Reset the TX and RX statistics.

SW3

N/A

N/A

SW4

N/A

N/A

LED1

Transmission Success

Toggle LED when a wireless transmission is successful.

LED2

N/A

N/A

LED3

N/A

N/A

LED4

N/A

N/A

RGB

Pairing Event

Indicate pairing event as described in the pairing section.

Table 22: Coordinator User Interface Description

Interface

Name

Description

SW1

Pairing Process

Press and hold for 3 seconds: Pair, unpair, or abort the pairing process depending on the current state.

Reset Stats

Press for less than 250 ms: Reset the TX and RX statistics.

SW2

LED0

Transmission Success

Toggle LED when a wireless transmission is successful.

LED1

N/A

N/A

LED2

N/A

N/A

Node User Interface

  • LED2 toggles every time a packet is successfully received from the Coordinator (almost always on because of the high packet rate).

Table 23: Node User Interface Description

Interface

Name

Description

SW1

Pairing Process

Pair, unpair, or abort the pairing process depending on the current state.

SW2

Reset Stats

Reset the TX and RX statistics.

SW3

N/A

N/A

SW4

N/A

N/A

LED1

N/A

N/A

LED2

Reception Success

Toggle LED when a wireless reception is successful and the data is valid.

LED3

N/A

N/A

LED4

N/A

N/A

RGB

Pairing Event

Indicate pairing event as described in the pairing section.

Table 24: Node User Interface Description

Interface

Name

Description

SW1

Pairing Process

Press and hold for 3 seconds: Pair, unpair, or abort the pairing process depending on the current state.

Reset Stats

Press for less than 250 ms: Reset the TX and RX statistics.

SW2

LED0

N/A

N/A

LED1

Reception Success

Toggle LED when a wireless reception is successful and the data is valid.

LED2

N/A

N/A

Certification

This application has the ability to run in Certification Mode.

When certification mode is active, a dedicated LED is activated to indicate that the mode is enabled. All activity status LEDs (transmission, reception, fallback, and payload) are suppressed so that only the certification indicator is visible.

Table 25: Certification Mode Indicator

Board

Indicator

Quasar

RGB LED steady yellow.

EVK1.4

Steady LED2.

Only one level of certification is needed for this application since the datarate is constant. The activation process must be performed independently on both the Coordinator and the Node.

Table 26: Certification Mode Activation

Certification Mode

Activation Process

Datalink Certification

Hold SW2 at startup until the LED 1 blinks once, then release.

Terminal

The following figure shows the terminal output of this application.

See Viewing the Terminal for details on how to view the terminal output.

Datalink Serial Interface Output

Figure 20: Datalink Serial Interface Output (from left: Coordinator & Node).

See Wireless Core API - Statistics for more details.


© Copyright 2026, SPARK Microsystems Intl.