RAILTest Application


Pre-requisites

This is the third topic under the Sample Applications Review – RAIL course, make sure you check out the other sample applications. It is assumed that you have already passed the Getting Started with Proprietary Wireless course. In case you missed it, start by visiting the following website:

It is also recommended that you read the documents listed below. They can be found by navigating Simplicity Studio: Launcher -> Getting Started tab -> SDK Documentation -> Flex SDK or by clicking the links below:


Practical Hints for Using the CLI


CLI History

RAILTest has a simple Command Line Interface (CLI). Unlike other regular operating system CLI, RAILTest’s CLI has no history recall feature; meaning, pressing the up arrow in your terminal software does not recall the previously entered commands. If this is an issue, you can use a terminal program, which has macro capability. The commands RAILTest CLI are not case-sensitive.


RSSI and Output Power

The received signal level (getRSSI command) in dBm is calculated from the RSSI (Received Signal Strength Indicator) value. This is more like an indication than an accurate measurement. The errors come mainly from:

  • Chip to chip variation
  • Component value spread on the board
  • Different PHY settings (bandwidth, data rate, etc.) will produce different RSSI value for the same input signal
  • Non-linearities at low and high signal levels

The radio board must be calibrated to a known good signal generator to get accurate readings.

The same is true for the transmitter side. The output power set in RAILTest is just an approximate value. The following can be the sources of error:

  • Chip to chip variation
  • Board component value variation
  • Non-linear behavior of the power amplifier
  • Supply voltage
  • Incorrect/inaccurate termination (not 50) 


Using a Coin Cell

For TX tests, do not use a coin cell (CR2032) battery because it has a small capacity and a large internal resistance. The high current during transmission discharges the battery fast. Even during short packets, the battery voltage drops due to the internal resistance and the output signal gets distorted and its amplitude decreased. To perform TX tests, connect the Wireless Starter Kit (WSTK) to the PC or use an external battery pack.

For current measurement, the Energy Profiler can be used. The board controller and the related supply circuits generate some noise. This, and the current measurement amplifier’s own error and noise make the measurements inaccurate in the low uA range. The profiler measures the total current. This way, the current consumed by the peripherals (e.g., pull-up resistors, LEDs, and sensors on the WSTK) is included. The chip is connected using analog switches to the interfaces on the WSTK. If these switches are not set correctly and the board is powered from a battery, the power consumption might be higher than expected. This can be caused by the Universal Asynchronous Receiver/Transmitter (UART) circuit still connected to the radio or many other reasons.

The Energy Profiler can be also used for timing measurement.

It is possible to multiplex test signals to GPIO pins. Use the setDebugSignal [pin] CUSTOM_PRS command. The pin can be PC10, PC11, PF2, PF3, PF4, PF5, PC9, PD9, PD10, PD11 or PD12 GPIO pin. PC10 is routed to EXP15 and PC11 is to EXP16 – EXP is the expansion port of the WSTK. The source and signal numbers can be found in the appropriate EFR32’s family documentation, in the PRS section, and in the PRS_CHx_CTRL – Channel Control Register description.

For example, to route the preamble detect to PC10 on a EFR32xG12: for the MODEMPREDET signal has the value of 0b001 (=1), and the SOURCESEL for this is 0b1010110 (MODEM) (=0x56). Issue the setdebugsignal PC10 CUSTOM_PRS 0x56 1 command. Both decimal numbers (without any prefix) and hex numbers (with 0x prefix) can be used.


Changing Payload Content

By default, the RAILTest uses fixed packet length. To change the payload, use the setTxPayload command. The first parameter defines the offset, the following ones modify the content of the packet from that specific offset. To change the length, use the setFixedLength command, where the parameter specifies the length of the payload. The length must be set to the same value on both the TX and RX side. You need to be in Idle mode to perform the change; issue the rx 0 command. Do not forget to turn the receiver back on (rx 1). On the TX side you need to load enough data in the FIFO. Use the setTxLength command for this. If the number of the data bytes loaded in the FIFO is less than the packet length, you will get a FIFO underflow error and the chip will not transmit at all.

If you want to use variable packet length, you need to modify the setting in the .isc file; it is not possible from the RAILTest CLI. On the Radio Configuration tab, go to the Profile options – Packet section. Select the Header Enable option from the Frame General tab and set the Frame Length Algorithm to VARIABLE_LENGTH. Set the parameters on the Frame Variable Length according to your needs.

Example: Set the first byte of the payload to be the length byte and the maximum length 64 bytes then change the Maximum Length to 64 and the Variable Length Bit Size to 8 bits. Perform this change on both the RX and TX side, generate the settings, compile the program and download to the EFR32 chips. Finally, configure the TX device using the CLI:

  • Set the first byte of the payload to 64 (packet length) settxpayload 0 64
  • Set the number of bytes to load in the FIFO to 65 (1 byte length + 64 bytes payload): settxlength 65
  • Transmit the packet: tx 1
  • On the RX side you should see the packet arriving


What’s Next?

Culminate the Sample Applications Review for RAIL by checking out a sample application pair that describes the use of Flex SDK for Wireless M-Bus on EFR32, read WMBUS Sample Applications.

Close
Loading Results