TI论坛
直播中

李椰潭

7年用户 193经验值
私信 关注

请问CC1310- SDK如何连续不断发送数据包?应该怎么修改?

本帖最后由 一只耳朵怪 于 2018-6-6 16:27 编辑

您好,由于需要测试天线各种参数,需要编写一个持续发包的程序,我在ti例程里面打开了rfPacketTx_CC1310_LAUNCHXL_nortos_ccs这个例程,然后发现#define PACKET_INTERVAL     (uint32_t)(4000000*0.01f) /* Set packet interval to 10ms */     这个参数是修改时间的,  赋值的是  struct __RFC_STRUCT rfc_CMD_PROP_TX_s  这个结构体的 startTime 这个成员,里面的其他成员变量没看看懂,请问 如果我想连续不断发送数据包的话 ,需要怎么修改呢?  非常感谢

回帖(2)

凌云志

2018-6-6 11:25:42
不需要啊.  支持测硬件的话,用smartRF studio, 不用写代码,轻松控制各种发包.
www.ti.com/.../smartrftm-studio

User guides (2)
SmartRF Studio 7 Tutorial (Rev. B)
www.ti.com/.../swru194


SmartRF Studio 7 Overview (Rev. B)
www.ti.com/.../swru195


Description
SmartRF™ Studio is a Windows application that can be used to evaluate and configure Low Power RF devices from Texas Instruments. The application helps designers of RF systems to easily evaluate the radio at an early stage in the design process. It is especially useful for generation of configuration register values and commands, and for practical testing and debugging of the RF system. SmartRF Studio can be used either as a standalone application or together with applicable evaluation boards or debug probes for the RF device.

SmartRF™ Studio supports all the Low Power RF devices from TI. Note that you might need to use an older version of the tool to work with some of the older devices.

SmartRF Studio 6

CC400, CC900
CC1000, CC1010, CC1020, CC1021, CC1050, CC1070
CC2400, CC2420
SmartRF Studio 7

CC1100, CC1100E, CC1101, CC1150
CC110L, CC113L, CC115L
CC1120, CC1121, CC1125, CC1175
CC1200, CC1201
CC1110-CC1111
CC1310, CC1350
CC1312R, CC1352R. CC1352P
CC2500, CC2550
CC2510, CC2511
CC2430, CC2431
CC2520
CC2530, CC2531, CC2533
CC2538
CC2540, CC2541
CC2543, CC2544, CC2545
CC2650, CC2640, CC2640R2F, CC2630, CC2620
CC2642R, CC2652R
CC430 (all variants)
Features
Link tests. Send and Receive packets between nodes.
Antenna and radiation tests. Set the radio in continuous wave TX and RX states.
A set of recommended/typical register settings for all devices.
Read and write individual RF registers.
Execute individual commands to control the radio.
Detailed information about the bit fields for each register or command.
Save/Load device configuration data from file.
Exports register settings and command arguments to a user definable format.
Exports radio configuration code (CC13xx, CC26xx).
Allows custom GPIO configuration (CC13xx, CC26xx).
Communication with evaluation boards over USB via the debug probe or evaluation board.
Up to 32 evaluation boards are supported on a single computer.

SmartRF Studio 6 runs on Microsoft® Windows 98, Windows 2000, Windows XP (32 bit), Windows Vista (32 bit) and Windows 7 (32 bit).

SmartRF Studio 7 runs on 32 and 64-bit versions of Microsoft® Windows 7, 8 and 10.

Installation Recommendations:

Download the ZIP file to your hard drive.
Unzip the file.
Read the readme.txt file for information about the release.
Run the set-up file and follow the instructions.                                                                           
举报

凌云志

2018-6-6 11:36:13
SDK里面的PER就是发包测试代码,也可以参考看看.
C:tisimplelink_cc13x0_sdk_1_60_00_21examplesrtosCC1310_LAUNCHXLdriversrfPacketErrorRate

Packet Error Rate Example Application

The Packet Error Rate (PER) example showcases different RF transfer modes of the CC13xx. It combines tasks, events and several peripherals to a platform- independent application and runs on all CC13xx launchpads as well as the CC1310EM/SmartRF06.
Test cases are provided for the following RF modes:

  • Custom: Custom settings to be exported from SmartRF Studio to the smartrf_settings.c file
  • 2-GFSK: Generic frequency shift keying with binary symbols, 50 kBit/s
  • LR Mode: Legacy Long Range (625 bps)
  • OOK: On-off keying
  • HS Mode: High-speed mode with up to 4 MBit/s
  • SL LR: SimpleLink Long Rang (5 kbps)
  • BLE: Bluetooth Low Energy (CC135X only)
Note that when running the CC1310-CC1190, CC1350 (433 MHz) or CC1352 Launchpads, HSM and OOK are not supported by the PER test. Additionally, the Legacy Long Range Mode (LRM) is not supported on CC1352.
Peripherals Exercised

This example uses the following CC13xx peripherals:

  • RF core for radio communication
  • 2 GPIOs for buttons
  • 3 GPIOs for controlling the CC1190 when running CC1310-CC1190 Launchpad
  • SPI to drive the LCD displays on the boards
  • UART0 (115200 Baud) as an alternative display on VT100-compatible terminal emulators
PeripheralIdentifierCC13xxEM/SmartRF06CC13xx LaunchpadCC1310-CC1390 LaunchpadSelect buttonBoard_PIN_BUTTON0UPBTN-1BTN-1Navigate buttonBoard_PIN_BUTTON1DOWNBTN-2BTN-2Display–LCD Dogm1286Display Booster PackDisplay Booster PackCC1190 ControlBoard_HGM––DIO28signalsBoard_LNA_EN––DIO29Board_PA_EN––DIO30Resources & 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 /source/ti/boards/.
Example Usage

This example requires two boards, each running the PER Test application. However, the packet format is identical to the default one in SmartRF Studio, so that any compatible hardware can be used as well.

  • Connect a display to the board or alternatively, use the UART and hook it to a VT100-compatible terminal emulator at 115200 Baud. Use PuTTY or TeraTerm on Microsoft Windows. On Linux, use the terminal emulator that is shipped with your distribution. After a splash screen, you will see the main menu (the range extender option (CC1190) is only shown for CC1310 LAUNCHLX):
    Main Menu>Test: 2-GFSK Freq: 868.0 Pkts: 10 CC1190: Disable Mode: Rx Start...
  • Navigate through the rows with BTN-2/DOWN, modify a value or start the selected test with BTN-1/UP. Note that it is the user’s responsibility to enable CC1190 from the menu when running CC1310-CC1190 LAUNCHXL.
  • Use a second board with the PER test application as test companion for transmissions. Once started, the current progress is shown with these menus (TX mode on the left side, RX on the right):
    Sending...      |  Receiving...2-GFSK  868.0   |  HS Mode 868.0                |  Pkts ok   : 39Pkts sent: 47   |  RSSI [dBm]: -74                |  PER  [%]  : 17.01                |                |  Push a button                |  to abort.
The receiver prints the amount of successfully received packets (Pkts ok), the Signal strength of the current packet (RSSI) and the observed packet error rate (PER) in percent. Please note that the PER is n/a when sending more packets than configured in the receiver.

  • You can always abort a running test case by pushing any button and go back to the main menu.
Application Design Details

The PER test application contains of one main task and an event handler to synchronize the task with buttons. After setting up all resources, the menu task is started and runs in an endless loop. It shows the menu and invokes test cases in either rx.c or tx.c.
                                                                          
举报

更多回帖

发帖
×
20
完善资料,
赚取积分