rfPacketTx Example
Example Summary
The Packet TX example illustrates how to do simple packet transmission using the RF driver. This example is meant to be used with the Packet RX example or SmartRF Studio. For every packet transmitted, Board_PIN_LED1 is toggled. The frequency and other RF settings can be modified using SmartRF Studio.
Note that this project is set up to operate on the CC1352P1 by default, i.e. the high PA mode for Sub-1 GHz frequencies is enabled. In order to support this project on the CC1352P-2 the user must set USE_SUB1_HIGH_PA_SETTING to 0 in smartrf_settings.c
Peripherals Exercised
Board_PIN_LED1- Toggled when data is transmitted over the RF interface
Resources & Jumper Settings
If you’re using an IDE (such as CCS or IAR), please refer to Board.html in your project directory for resources used and board-specific jumper settings. Otherwise, you can find Board.html in the directory <SDK_INSTALL_DIR>/source/ti/boards/<BOARD>.
Example Usage
Run the example. On another board, run the Packet RX example. Board_PIN_LED1 is toggled when data is transmitted.
Application Design Details
This examples consists of a single task and the exported SmartRF Studio radio settings.
The default frequency is 868.0 MHz (433.92 MHz for the CC1350-LAUNCHXL-433 board). In order to change frequency, modify the smartrf_settings.c file. This can be done using the code export feature in Smart RF Studio, or directly in the file.
When the task is executed it:
- Configures the radio for Proprietary mode
- Gets access to the radio via the RF drivers RF_open
- Sets up the radio using CMD_PROP_RADIO_DIV_SETUP command
- Set the output power to 14 dBm (requires that CCFG_FORCE_VDDR_HH = 1 in ccfg.c)
- Sets the frequency using CMD_FS command
- Create packet (with increasing sequence number and random content)
- Transmit packet using CMD_PROP_TX command with blocking RF driver call
- Toggle Board_PIN_LED1 to indicate packet transmitted
- Power down the radio using the yield function
- Set the main core to sleep for the duration of
PACKET_INTERVALms - Transmit packets forever by repeating step 6-10
Note for IAR users: When using the CC1310DK, the TI XDS110v3 USB Emulator must be selected. For the CC1310_LAUNCHXL, select TI XDS110 Emulator. In both cases, select the cJTAG interface.