So finally, I made it to make my first post about wireless communication. I have been playing with TI’s SimpliciTI protocol stack for a while now, and I have seen a lot of cases where people have a common issue when people trying to use the stack with their own custom hardware. There is a small guide on TI wiki on how to debug the RF link which can be found at the following link, however I found out an additional simple test mechanism which can help people deploying the stack on their custom hardware.
DISCLAIMER: before we start, just want to give a disclaimer that I am basically more a software guy than hardware guy (in fact I almost know zero about antenna tuning on RF hardware), so I am basically writing this small guide from the eye of a programmer
SimpliciTI is basically a light-weight wireless protocol stack from Texas Instruments, ported and running on various TI’s RF SoC and MCU+RF ISM band transceivers. It is quite a nice tool for people who doesn’t have any experience at all with RF communication, since it works directly “out of the box” with TI development kits (except for this one which really confuses people a lot, I think TI needs to change this in their next releases for the Simple Peer-To-Peer example). However things start to be a bit complicated when people try to move from TI kits to their own custom board (especially because they don’t have good experience with RF). Many times people can’t see their board working/communicating with TI kits anymore. As I said before, there is a nice wiki about how to debug the RF connection. However many people sometimes are trapped even before the first step to try seeing the packets with TI Smart Sniffer, because they are designing faulty hardware – most probably the balun (balanced-unbalanced) circuitry or some problem with the oscillator. Therefore unfortunately, you will need to check whether your board is working properly by using a spectrum analyzer.
So I made the following example: I am using the EM430F6137RF900 kit from TI (let’s say this is my custom board), and then I want to test whether my RF circuitry is ok (since i am a software guy, and I try to copy paste TI reference design, but I am not sure whether I did the right thing). So what I can do is as follows: according to this wiki from TI, you can use the SmartRF Studio to generate a header file containing custom RF setting to be compiled with SimpliciTI. So I did the same thing, using SmartRF Studio i select CC430 as target device (working with off-line mode), and then select the pre-configured setting in “Expert Mode” tab for 38.4 kBaud data rate, and basically change the base frequency setting from 868 MHz to 870 MHz.
Then as described in the wiki above, I do an export of this setting to a SimpliciTI compliant header file and put it into the correct path for CC430 radio setting header file (if you use the default installation path for SimpliciTI 1.1.1, you should find it under: C:\Texas Instruments\SimpliciTI-IAR-1.1.1\Components\mrfi\smartrf\CC430\smartrf_CC430.h).
Next step would be to compile a test program and check whether the stack is operating at the correct base frequency. The easiest way to do this is to make the stack transmitting continuously while seeing the power using spectrum analyzer. However one might get confused how to do this since it can be complicated as if you use the stack example as is, you need to setup the link first before being able to transmit and receive between nodes. There is a simple way to do this by using SMPL_Ioctl() API of the stack with IOCTL_OBJ_RAW_IO, IOCTL_ACT_WRITE parameters in order to just transmit raw data “bypassing” the linking mechanism of the stack. The easiest way to do this is just by taking the Simple-Peer-To-Peer example code, and change the application code with my test code as follows: SimpliciTI_RF_Test
After compiling the test code, I flashed it to the EM430 kit i have and run the firmware beside a spectrum analyzer as shown follows:
and here is the capture of the spectrum analyzer output:
As can be seen above, the CC430 kit successfully transmits the signal with base frequency at 870 MHz as specified by the RF setting generated by the SmartRF Studio. This proofs that the hardware design is correct, as in my case it is of course because I am using TI kit which has been tested before :-). If the output of the spectrum analyzer differs than the one specified in the RF setting, you might want to check the hardware design especially the balun or oscillator part, both schematic and layout. And in this case, don’t ask me because I can’t really help you with the hardware stuffs .