Important: Before you run this example, make sure to program the SoftDevice.
Advanced burst data transmission provides a mechanism to transfer bulk data with a maximum data throughput of 60 kbps. The transmission rate, along with optional features such as frequency hopping, is negotiated over the air, offering backward compatibility with implementations that support only standard burst. In order to sustain this data throughput, the application must ensure that data is available for transmission on a timely basis. One mechanism available to achieve this is buffering. ANT SoftDevices provide a burst handler that can queue arbitrary amounts of burst data for transmission by passing an input buffer with the data to send. While it is possible to place the entire burst data in the input buffer, this may not be a feasible option for large amounts of data due to RAM limitations.
The purpose of this example is to demonstrate how to send and receive large amounts of burst data while buffering smaller blocks of data (128 bytes) at a time. This example shows how to process the different ANT events to queue the next block of data for optimal throughput, as well as to determine the success or failure of the burst transfer. The example also shows how to split the received advanced burst data into 8-byte segments, resembling standard burst messages. For more details on burst transfers, refer to the application note ANT AN Burst Transfers.
This example is intended to be paired with an ANT USB stick and the ANTware II PC application configured as a slave.
After startup, this example configures and opens an ANT master channel with the following channel parameters:
Parameter | Value |
---|---|
Channel type | Master (0x10) |
Extended assignment | 0 |
Network | Public |
Radio frequency | 66 |
Device number | Serial Number |
Device type | 2 |
Transmission type | 1 |
Channel period | 8192 (4 Hz) |
The advanced burst that is enabled by this example uses the following parameters:
Parameter | Value |
---|---|
Enable | ADV_BURST_MODE_ENABLE |
RF payload size | ADV_BURST_MODES_MAX_SIZE (24 bytes) |
Required features | 0 (none) |
Optional features | 0 (none) |
For more details on the different parameters used when configuring advanced burst, refer to Section 9.5.2.27 of the ANT Message Protocol and Usage document.
After successfully configuring and running this example, pressing BSP_BUTTON_0 on the board sends a burst transfer with BURST_TOTAL_PACKETS 8-byte packets. The burst is filled with dummy data. BSP_LED_0 turns on while the burst is in progress, either transmitting or receiving. BSP_LED_1 will turn on if the burst fails to complete.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_advanced_burst
Note: You can use a custom channel or encryption when running any of the ANT examples. When adding a new channel or encryption, remember to update SoftDevice ANT event handler configuration.
Follow these steps to test the Advanced Burst example:
<InstallFolder>\examples\ant\ant_advanced_burst\ant_advanced_burst_test.xml
.