smartrf studio hands on user guide (rev. a

35
1

Upload: others

Post on 30-May-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SmartRF Studio hands on user guide (Rev. A

1

Page 2: SmartRF Studio hands on user guide (Rev. A

2

Page 3: SmartRF Studio hands on user guide (Rev. A

3

Page 4: SmartRF Studio hands on user guide (Rev. A

The first goals for this session is for you to get familiar with SmartRF Studio, learn what it does and how it works.

The next goal is to learn how to use SmartRF Studio in order to tune the RF settings by modifying the chip’s radio register values This is the primary use case ofby modifying the chip s radio register values. This is the primary use case of SmartRF Studio among customers.

The last goal is to learn some other examples of how one can use SmartRF Studio in other common real life situations system developers run into. After this training you will hopefully be acquainted enough with SmartRF Studio so you can help c stomers on their a And the best a of learning is b doingcustomers on their way. And the best way of learning is by doing.

4

Page 5: SmartRF Studio hands on user guide (Rev. A

This is the start-up screen of SmartRF Studio.At the top we have one tab for each SmartRF generation available. The ”SmartRF 04 DK” tab contains all RF-ICs that has a SmartRF04-based development kit. This is the generation where you can find the most radio chips. The ”SmartRF 05 DK” was recently added by the release of the CC2520DK in December 2007.Each tab has a list of ”Calculation Windows” – one for each available chip. If you open any of these you will get a theoretical radio register interface that shows you all available registers for that chip, but it is not connected to a physical device/chip.

If you connect a SmartRF04EB Evaluation Board with a Evaluation Module it will appear at the top of the list when it gets connected. In addition to list what chip that is mounted on the EB, there is a column with ”USB DID” and ”FW ID”.The USB DID is the USB Device ID, and is stored in the firmware (actually the USB MCU bootloader) of the SmartRF04EB. This is used to identify each Evaluation Board when there are several connected EBs connected.

( ) f S 0The FW ID shows the ID number (and revision number in parenthesis) of the SmartRF04EB firmware. Firmware 0x0400 is the standard firmware for SmartRF04EB.

Open one of the actual devices by either double-clicking it, or select it and press the ”Start” button in the bottom right corner. A new window will open.

5

Page 6: SmartRF Studio hands on user guide (Rev. A

Four main views in Normal View: Registers, Chip Status, Configuration settings, Test control

6

Page 7: SmartRF Studio hands on user guide (Rev. A

Register control and command interface

7

Page 8: SmartRF Studio hands on user guide (Rev. A

SmartRF Studio communicate with the Evaluation Board over the USB interface. The Application programming interface (API) is provided by the CEBAL library. This is a SW library developed to interface the USB driver and with all the functions required to read/write data over the SPI interface between the USB MCU and the Tranceiver. To use the API provided by the CEBAL library it is required with the correct Firmware on the USB MCU. If the firmware has been overwritten with something l th th FW f ll i th E l ti B d th i ti ill t belse than the FW following the Evaluation Board, the communication will not be

possible.SmartRF Studio will send a request with eventually some data to the USB MCU. The USB MCU will handle the request and apply the propriate read/write commands on the SPI interface.The USB driver is a licensed driver delivered by Thesycon: htt // th d / /h ht lhttp://www.thesycon.de/eng/home.shtml

8

Page 9: SmartRF Studio hands on user guide (Rev. A

For the SoC we use the same SW library on the PC side and the same FW on the USB MCU. The difference is that the USB MCU will use the debug interface to read/write data of the SoC.

9

Page 10: SmartRF Studio hands on user guide (Rev. A

10

Page 11: SmartRF Studio hands on user guide (Rev. A

With SmartRF Studio it is very easy to measure the signal strength on the receiver. This can be very useful to find the optimal RF settings.

11

Page 12: SmartRF Studio hands on user guide (Rev. A

Select Preferred settings.Remember to set the correct frequency.Set data format to ”Asynchronous transparent mode”.Start unbuffered TX.

12

Page 13: SmartRF Studio hands on user guide (Rev. A

Select Preferred settings.Remember to set the correct frequency.Set data format to ”Asynchronous transparent mode”.Start unbuffered RX.Read the RSSI value at the bottom left side of the screen.

13

Page 14: SmartRF Studio hands on user guide (Rev. A

Change the frequency on the receiver about 500 kHz off the frequency of the sender and see that the signal strength decrease.

Change the RX filter bandwidth on the reciever to about 800 kHz and see that the signal strength increase.

Reduce the output power from the transmitter and see that the received signal isReduce the output power from the transmitter and see that the received signal is reduced similarly. The result could be influenced by the distance between the two devices. If the devices are to close to each other, the differences at the tranceiver and the receiver side could be less accurate.

14

Page 15: SmartRF Studio hands on user guide (Rev. A

15

Page 16: SmartRF Studio hands on user guide (Rev. A

The packet error rate test is an easy way to check the link quality between two devices. The user can select preferred settings given by SmartRF Studio or use customized register values to do the PER testing. If the testing require more distance between the devices, it is possible to run the PER test in stand alone mode. This requires that the board is battery powered. The joystick on the Evaluation Board must be used to configure the PER test. The most important settings like frequency and number of packets can be selected from the

Oth RF tti ill b d t i d b th l ti f th t lmenu. Other RF settings will be determined by the selection of the preset value. Preset #1 and #2 use predefined values. Preset #3 are the settings used the last time the device was connected to the PC. To use customized settings, the PER test must be executed at least ones while connected to the PC. On start of this test the register values will be stored under preset #3.

16

Page 17: SmartRF Studio hands on user guide (Rev. A

Select preferred settings and the PER test panel.In the PER test panel we have to select the mode: Master or Slave. We start with the Slave unit. Click on the ”Start PER” button to start the test. The slave unit will wait for the configuration data.

17

Page 18: SmartRF Studio hands on user guide (Rev. A

For the second units we have to select the same settings and specify that we want this unit to be in Master mode.Click on the ”Start PER” button.The log window should start to show packets sent from Master to Slave and the other way around, packets sent from Slave to Master.At the end of the test, the crcErrors will show the actual packet error rate.

18

Page 19: SmartRF Studio hands on user guide (Rev. A

19

Page 20: SmartRF Studio hands on user guide (Rev. A

20

Page 21: SmartRF Studio hands on user guide (Rev. A

Code export is very useful for programming of register values. It is possible to use one of the predefined templates or to create your own template to customize the exported code to fit 100 % in your own source code.

21

Page 22: SmartRF Studio hands on user guide (Rev. A

Template name: After the template is defined, a name should be given and the Save b tt h ld b li k d Th fil ill b d th di t hbutton should be clicked. The file will be saved on the same directory as where SmartRF Studio is installed.Make chip specific: If the template is dependent on the type of chip, this checkbox should be checked before the template is saved. Later this template will only be visible for that chip.Normal View summary and Comments delimiters: A summary of the RF parameters selected in Normal view, can be added as comment to the exported code. The se ected o a e , ca be added as co e t to t e e po ted code erequired syntax for comments can be specified in the ”Comment delimiters” fields.Header: The header will be given ones in the begining of the exported code.For each register: The syntax to be used for the exported register values can be found in the help menu on the right side. Most of the tags can be inserted using the buttons abowe the input field.Footer: The footer will be given ones at the end of the exported code.The existing templates can be seen in the bottom left window. A double click on one of the templates will generate the code in the output window on the right side.The generated code can be copied to the clipboard or written to a file.

This example show how to define a structure with the RF register values.

22

Page 23: SmartRF Studio hands on user guide (Rev. A

23

Page 24: SmartRF Studio hands on user guide (Rev. A

With SmartRF Studio it is also possible to send data ”manually”. Manually in the sence that each action required to send and receive data between two nodes is initiated manually from SmartRF Studio.With this feature it is possible to test or verify the same scenario as used in the programming of the chip.

24

Page 25: SmartRF Studio hands on user guide (Rev. A

For this case study the chip will start in the IDLE mode. The programmed OFF modes will be IDLE. See register MCSM1 for further details.Using SRX or STX directly from IDLE state will automatically bring the chip in Transmit or Receive mode.

25

Page 26: SmartRF Studio hands on user guide (Rev. A

FIFO is an acronym for First In, First Out. A FIFO is a queue/buffer where the data that enters the queue first is the first to be processed.

When sending a packet using the radio’s packet mode, the MCU first has to write the packet data into the transmitter’s TX FIFO over the SPI interface. Next, the MCU have to issue a STX command strobe to start the transmission.

The receiver should already be configured in receive mode (RX) and when it packet is received, the data will be placed in the radio’s RX FIFO and the MCU will be given an interrupt.

The benefit about using these packet FIFOs is that the MCU doesn’t have to be in acti e mode hile the radio transmits or recei es a packet E g the MCU can fill theactive mode while the radio transmits or receives a packet. E.g. the MCU can fill the TX FIFO quickly and start transmission and go back to sleep. Or it can stay powered down while data is received and be woken up with an interrupt by the radio when the entire packet is ready. Hence, this helps the MCU save power.

26

Page 27: SmartRF Studio hands on user guide (Rev. A

Using the packet handling functionality offloads the MCU and allows simpler software since the hardware will do some checking and verification that you otherwise would have to implement in software.

27

Page 28: SmartRF Studio hands on user guide (Rev. A

1. Remember to set correct frequency. The required frequency can be seen on the PCB of the CC1101EM.

2. ”Packet RX” mode is selected to ensure the correct register settings for the receiver.

3. ”Reset CC1101 and write settings” is required to get the register values set on the chip.

4 To ensure that the correct register values are shown in register view this button4. To ensure that the correct register values are shown in register view, this button should be clicked.

28

Page 29: SmartRF Studio hands on user guide (Rev. A

Check that the chip is in IDLE state before the SRX command is executed. The click on the SRX button will be translated by the USB MCU on the evaluation board to the correct command on the SPI interface of the tranceiver.

29

Page 30: SmartRF Studio hands on user guide (Rev. A

1. Same comments as for the TX unit. Rember to set the correct frequency.

30

Page 31: SmartRF Studio hands on user guide (Rev. A

1. To send something from the transmitter we have to fill the TX FIFO with data.2. If ”Insert length” is not checked, the length byte must be given as the first byte of

the TX FIFO.3. Write to TX FIFO4. TXBYTES will count number of bytes given in the TX FIFO input field pluss one

for the length byte if the ”Insert length” is checked. In our case we should see that the number of bytes is 10that the number of bytes is 10.

31

Page 32: SmartRF Studio hands on user guide (Rev. A

1. Same as for the Receiving unit. The STX command will be translated by the USB MCU to the correct commands on the SPI interface of the tranceiver.

2. If all the data has been sent successfully, the number of bytes should be reduced to zero.

32

Page 33: SmartRF Studio hands on user guide (Rev. A

1. In our case the chip has been programmed to go to IDLE when expected number of bytes has been received. See MCSM1.RXOFF_MODE

2. ”Read RX FIFO” will empty the RX FIFO buffer. If we click the button(Blue arrows on toolbar) to read the latest register values before we click the ”Read RX FIFO”, RXBYTES will show number of bytes in the RX FIFO.

3. Length(1) + payload(9) + CRC(2) = 12 bytes

33

Page 34: SmartRF Studio hands on user guide (Rev. A

34

Page 35: SmartRF Studio hands on user guide (Rev. A

IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,and other changes to its products and services at any time and to discontinue any product or service without notice. Customers shouldobtain the latest relevant information before placing orders and should verify that such information is current and complete. All products aresold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standardwarranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except wheremandated by government requirements, testing of all parameters of each product is not necessarily performed.TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products andapplications using TI components. To minimize the risks associated with customer products and applications, customers should provideadequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right,or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Informationpublished by TI regarding third-party products or services does not constitute a license from TI to use such products or services or awarranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectualproperty of the third party, or a license from TI under the patents or other intellectual property of TI.Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompaniedby all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptivebusiness practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additionalrestrictions.Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids allexpress and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is notresponsible or liable for any such statements.TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonablybe expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governingsuch use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, andacknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their productsand any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may beprovided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products insuch safety-critical applications.TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products arespecifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet militaryspecifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely atthe Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products aredesignated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designatedproducts in automotive applications, TI will not be responsible for any failure to meet such requirements.Following are URLs where you can obtain information on other Texas Instruments products and application solutions:Products ApplicationsAmplifiers amplifier.ti.com Audio www.ti.com/audioData Converters dataconverter.ti.com Automotive www.ti.com/automotiveDSP dsp.ti.com Broadband www.ti.com/broadbandClocks and Timers www.ti.com/clocks Digital Control www.ti.com/digitalcontrolInterface interface.ti.com Medical www.ti.com/medicalLogic logic.ti.com Military www.ti.com/militaryPower Mgmt power.ti.com Optical Networking www.ti.com/opticalnetworkMicrocontrollers microcontroller.ti.com Security www.ti.com/securityRFID www.ti-rfid.com Telephony www.ti.com/telephonyRF/IF and ZigBee® Solutions www.ti.com/lprf Video & Imaging www.ti.com/video

Wireless www.ti.com/wireless

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2008, Texas Instruments Incorporated