Logo
SPARK Microsystems SDK v2.1.0
  • Introduction
  • Features
  • Getting Started
    • Preferred Integrated Development Environment (IDE)
    • Prerequisites
      • VS Code Extensions
      • Hardware
      • Linux Path Support
      • Windows Long Path Support
        • Through Group Policy
        • Through Windows Registry
    • Create the Virtual Environment with VS Code
    • Bootstrap the Virtual Environment Manually (optional)
    • Activate the Virtual Environment Without VS Code (optional)
    • 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
      • Hello World
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Terminal
      • Hello World RTOS
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Terminal
      • Star Network
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Coordinator User Interface
          • Node 1 User Interface
          • Node 2 User Interface
        • Terminal
      • Connection Priority
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Data exchange
            • Link Capacity Utilization
          • Coordinator User Interface
          • Node User Interface
        • Terminal
      • Audio Unidirectional
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Fallback
          • Clock Drift Compensation (CDC)
          • Coordinator User Interface
          • Node User Interface
        • Certification
        • Terminal
      • Audio Bidirectional
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Fallback
          • Clock Drift Compensation (CDC)
          • Board User Interface
        • Certification
        • Terminal
      • Fragmentation
        • Description
          • Fragmentation
          • Auto-Reply
        • Application Data Flow
        • Behavior
          • Application Schedule
          • Pairing
          • Board User Interface
        • Terminal
      • Datalink
        • Description
        • Behavior
          • Application Schedule
          • Pairing
          • Coordinator User Interface
          • Node User Interface
        • Terminal
    • Tools
    • Dual Radio Configuration
  • Cores
    • Audio Core
      • Introduction
      • End-User Application
      • Audio Core Components
        • Audio Pipeline
        • Audio Endpoint
        • Audio Processing Stage
          • Clock Drift Compensation
          • Audio Compression
          • Digital Volume Control
          • Sampling Rate Converter
          • Mute Packet
          • Mute on Underflow
          • Audio Packing
        • Audio Header
        • Audio Module
          • Audio Mixer
          • Audio Fallback
    • Wireless Core
      • Introduction
      • Concepts
        • Time Division Multiple Access
        • Network
        • Schedule
        • Frequency Switching
        • Addressing
          • PAN ID
          • Node Address
          • PAN Broadcast
        • Connection
        • 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
        • 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
        • Retransmission Margin
        • Sync Timeslot (Beacon)
        • Concurrency Considerations
        • Latency Calculation
        • Case Study: Latency Evaluation of an Application
        • Schedule Design Trade-off
      • Power Saving Strategies
      • Pairing Module
        • Description
          • 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
        • Pairing Procedure
          • Pairing Phases
          • Authentication Phase
          • Identification Phase
          • Addressing phase
        • Pairing Module Wireless Configuration
  • API Reference
    • Audio Core API
      • Initialization
        • Audio Core Configuration
        • Audio Pipeline Configuration
        • Audio Endpoint Configuration
      • Hardware Abstraction Layer
      • 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
        • Configure Concurrency
          • random_channel_sequence_enabled
          • rdo_enabled (Core)
          • ddcm_enabled
        • Wireless Node Configuration
          • role
          • pan_id
          • coordinator_address
          • local_address
          • isi_mitig
          • dynamic_phy_mode_enabled
        • Wireless Radio Module Initialization
          • Calibration
          • irq_polarity
          • std_spi
        • Wireless Connection Configuration
          • name
          • source_address
          • destination_address
          • max_payload_size
          • queue_size
          • chip_repet
          • timeslot_id
          • timeslot_count
          • credit_flow_ctrl_enabled
        • 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 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_add_fallback_channel
        • 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_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
      • CMake External Resources
  • Porting Guide
    • Articles
      • Project Guidelines
        • Best Practices
        • Advantages
      • 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 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
        • 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 - Implement the Backend for the SDK Application
  • Changelog
    • 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 28: 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 27: 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 28: 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 29: 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 30: 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

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 29: Datalink Serial Interface Output (from left: Coordinator & Node).

See Wireless Core API - Statistics for more details.


© Copyright 2025, SPARK Microsystems Intl.