Software apps and online services
Everything required for the workshop experience is provided on this page. This page is accessible from www.tinyurl.com/tisensorworkshop2021 for your convenience.
Participants in this workshop will get hands on experience building a wireless sensor network. We will use the CC1310 and CC1352R1 to create this simple point to point wireless connection. The CC1310 LaunchPad (LAUNCHXL-CC1310) will act as the receiver and the CC1352R1 LaunchPad SensorTag Kit (LPSTK-CC1352R) will be the transmitter because of its on board sensors. There are many choices of wireless stacks with these devices, but for this hardware combination we will use a stack called EasyLink from TI which is for Sub1-GHz communication. Primarily this communication will be 915MHz band in North America.
For the workshop we will make use of TI cloud tools. This is a great way to introduce the excitement of connectivity, electronics, and embedded systems in an accessible and fun way. Because the TI LaunchPad is open source and modular hardware, we can also add BoosterPack modules to augment our circuits, but we won't be taking advantage of that this time. This workshop will focus on using the integrated sensing that comes with the LPSTK. Humidity, temperature, light, motion, hall effect.
For advanced capabilities, students are encouraged to use Code Composer Studio desktop and C programming with the SimpleLink SDK to write firmware code for the LPSTK-CC1352R.
The LPSTK is a handy little board that can be used for all sorts of IoT prototyping. Check out this video to see some ideas where it can go.
First here are some impressions of the out of box setup
TI Intro Video
Semiconductor Manufacturing Tour VideoLab 0 - Prework
Before we dive into the hands on portion of the lab, we want to set up our computer with the CC1310 LaunchPad. This LaunchPad is also how we will program the LPSTK. We will run the example GUI to get set up with the the TI Cloud tools and then we will use CCS Cloud to upload an EasyLink RX example to the LaunchPad.
Chrome browser is recommended for this workshop so please proceed from this point with that.
First grab some helpful tools
http://www.ti.com/tool/SMARTRFTM-STUDIO (Windows only, this is very helpful for seeing packets being transmitted and other RF debugging features) If you do not have Windows, do not fret. It will be helpful for the final demo but you won't need it for most of the workshop.
http://www.ti.com/tool/FLASH-PROGRAMMER (this is not required for the workshop but just pointing to it as a resource. This is for flashing binaries, may not be useful to you in all situations)
http://www.ti.com/tool/UNIFLASH (this is not required for the workshop but just pointing to it as a resource. Similar to Flash-Programmer, this is for flashing binaries, may not be useful to you in all situations)
CC1310 LaunchPad GUI setup
Next we will want to set up our computer connection with the CC1310 LaunchPad. We will test this out in our Chrome browser with the example button GUI. Open it up in a new tab.
With your CC1310 connected to the USB cable, close the README text and the GUI will prompt you to install the TI Cloud Agent and Chrome Browser Extension. Proceed through these two steps and then refresh the webpage.
The TI Cloud Agent will install the USB drivers for your LaunchPad board. Now the GUI should attempt to connect to the board and flash a new program. You will see the emulator LEDs blink during this process. After the new firmware is loaded you will see a rapidly blinking red LED and the GUI will say Hardware Connected. To interact with the GUI you can press the side pushbuttons of the LaunchPad.
On the lower left corner you should see some status information such as Connecting to TI Cloud Agent, Connected to target, Downloading Program, Flash Successful, and Hardware connected.
Once you see it is connected. The GUI is super basic but you can see your button presses and duration on the two side buttons of the LaunchPad. Give it a quick try to verify the data is getting passed.
Cloud not working? Step 1: Try to get TI Cloud Agent drivers to cooperate
If you are having trouble with the web GUI you may be having issues with your LaunchPad USB drivers / TI Cloud Agent. Sometimes it is as simple as unplugging your USB cable to try and reset the driver or trying a different USB port on your computer.
- Try out these troubleshooting steps: https://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds110.html#troubleshooting
For Windows users also check in your device manager to see if you can see the XDS110 drivers properly installed under Ports. You should see two XDS110 instances under Ports, one for UART and one for Data, when the LaunchPad is plugged in. If they are looking strange or have warning signs then it is likely a driver installation issue. Try to run the installer for the TI Cloud agent again, maybe with admin access this time.
Cloud not working? Step 2: Local GUI
If for some reason you have no luck with the web GUI you can also switch to a local copy which can be downloaded below. This often fixes any issues. It will take an additional 5-10 minutes to install this. Make sure to install and run the local GUI as admin.
- Windows: https://dev.ti.com/gallery/dl/demos/button_CC1310_demo/ver/1.0.0?platform=win
- Mac OS: https://dev.ti.com/gallery/dl/demos/button_CC1310_demo/ver/1.0.0?platform=osx
- Linux 64 bit: https://dev.ti.com/gallery/dl/demos/button_CC1310_demo/ver/1.0.0?platform=linux64
Local GUI not working? Problems with debugger firmware?
If that isn't working either then it could be related to something on your LaunchPad emulator firmware side. You will need to look at the XDS Support Utilities to see if you can update the debugger firmware that way. Grab the download for your OS from the link below.
- The next screen will be a form that asks for your name and email and check the box for "civil" use and agree to the terms. It may require you to sign in to your myTI account, so sign up for that at my.ti.com if you don't have one yet.
The XDS Support Utilities (e.g. run ti_xds110_setup_18.104.22.168_windows.exe) should install an executable called xdsufu.exe in the directory: "installed directory"\ccs_base\common\uscif\xds110\ and this allows the user to perform a manual firmware update. You can check your board's version (for example firmware version of "22.214.171.124") by using the command "xdsdfu.exe -e"
The support utilities are located in the windows file path C:\ti\xds110\xdsdfu.exe
To perform a firmware update, switch to DFU mode using "xdsdfu.exe -m". Then, use command "xdsdfu.exe -f firmware_126.96.36.199.bin -r" to update the board's firmware to 188.8.131.52. This "firmware_184.108.40.206.bin" comes with the software package, it is in the same folder as "xdsdfu.exe". Now go back and run the GUI and it will perform another firmware update to 220.127.116.11 before successfully uploading the code to the hardware. For certain versions of the debugger, the board may not enter programming mode.
A last resort (which should not be necessary) is to try to install the drivers with CCS Desktop. This strategy probably won't be time efficient for the workshop but will give you the best chance of getting everything setup using the native tools in Code Composer if you did not have any luck with any of the previous utilities. You may also want to look at doing a computer restart and trying the previous avenues before attempting to install CCS.
That's just a super simple way to test that we are set up with the LaunchPad. Now the last step is to prepare CCS Cloud for our board. We will import the EasyLink code into our CCS Cloud workspace. This will turn our LaunchPad into a Sub-1GHz RF receiver using the EasyLink stack.
Program CC1310 LaunchPad with CCS Cloud
1. Go to dev.ti.com. Click the "Launch" button of CCS Cloud box listed lower in the page of TI Cloud Tools.
2. If you don't have a myTI account already, you can register for one and then sign in. If you do have one, go ahead and sign in and CCS Cloud will load your virtual workspace. Your work will be saved and you can access it whenever you log back in with your TI account. You can also download any of your work to your local machine or upload to GitHub.
3. You should get a work environment to pop up similar to the image below. If so we are doing well.
4. Now we need to get our demo code. We can find demo code in the TI Resource Explorer. Resource Explorer contains all the released code examples and many other helpful technical resources for all TI embedded processors from microcontrollers to DSPs. Next navigate back to dev.ti.com and click on the Resource Explorer box and click the "Launch" button to open it in a new browser tab. You should arrive to a page like this.
5. On the left hand side navigate to the Software folder. Expand the folders by clicking on the carrots or arrows next to each folder icon. You should see a bunch of SDKs revealed underneath the software folder.
6. Now in the left hand navigation under the "Software" folder click the "SimpleLink CC13x0 SDK..." > "Examples" > "Development Tools" > "CC1310 LaunchPad" > "EasyLink" and click on the "rfEasyLinkRx" sub folder and the "no RTOS" folder. Then the "CCS Compiler" folder and click one more level to "rfEasyLinkRx" to access the project files. This will be denoted by the red cube icon. On the right hand side on the top line above "main.c" there is a little cloud icon that says "Import to CCS Cloud" when you hover over it. Click that and it should open the project in your CCS Cloud workspace. This will open a blank tab which can be closed but you should see the new project appear in your CCS Cloud. As you can see, you have many options to use different compilers and to utilize a Real Time Operating System or not.
8. Now in CCS Cloud, make sure you have the "rfEasyLinkRx" project folder selected on the left hand navigation. You can have main.c open in your program window. Now we are going to upload this to our LaunchPad board.
9. At this point we have to double check our physical connection and serial port access. Connect your LaunchPad to the PC with the included USB cable if it is not already (it should be still connected from the GUI example). Now if you have your GUI still running you need to close it or disconnect the hardware by clicking the chainlink icon on the lower left corner of the GUI to release the port of the LaunchPad so CCS Cloud can use it to upload code.
10. To run our program on the hardware we are going to click the green play button that says "Run" at the top toolbar. CCS Cloud should be set up from the GUI but if it wasn't it will now help you install a few items needed to communicate with and flash the new code to your TI LaunchPad.
11. You may get a Build dialog to pop up or text may pop up in your console as the code compiles. You should see "build finished" pop up and some indication that the program is getting loaded to your LaunchPad hardware. Lastly you LaunchPad will have a blinking green LED now which is different from the red LED you had previously.
Congratulations your CC1310 LaunchPad is set up with your computer using the TI Cloud Tools and you can program new code to it any time. Now we will go to the next part of our wireless network which is the CC1352R1 LPSTK which will act like a sensor node that is transmitting data that will be received by our LaunchPad which is currently loaded up with the receiver code.Lab 1 - Bluetooth
We will demonstrate the BLE capabilities of the LPSTK. Please have your BLE enabled phone or tablet ready for this exercise. By default the LPSTK has the multi_sensor project loaded which the out of box firmware. It is indicated by a blinking blue LED when you switch the LPSTK to the "ON" position. The LPSTK will advertise as a BLE device in this mode.
Connecting to the software
You will need to connect the LPSTK to the TI SimpleLink Starter app as the first point of contact. LPSTK also works with LightBlue Explorer and BLE Scanner app but to get the full out of box experience, use the TI SimpleLink Starter app.
Having trouble? BLE 4 and BLE 5 require the app to have location data permissions (Android usually but possibly iOS too). If you are having trouble connect to the LPSTK from the app or even seeing it, then make sure the app has the location data permissions granted. Make sure your Blue LED is blinking, which indicates it is not connected to anything and advertising. When the LPSTK is connected the LED will turn solid green.
In a crowded room it may be hard to identify which LPSTK is yours. If you are working by yourself then it is much easier to see the LPSTK in range of your phone or tablet. If you are in a crowded are with other LPSTK users, you can try to distance yourself for a moment while pairing and then return to the crowd.
Go through the various sensor readouts including the buttons, LEDs, accelerometer etc.
Next try to upload new Zigbee firmware to the LPSTK using the OAD procedure in the App. After you have completed that. Follow the procedure to reset your LPSTK back to the default firmware sitting in ROM.
That's the BLE section just to show off that wireless capability and the sensors. Next we will go back to EasyLink and load the transmitter code to the LPSTK.
Software video by TI
With EasyLink we have a very basic radio stack that can be highly customized. For our purposes of having just one transmitter and one receiver, we won't need to get too fancy and just use the default examples. We already have the RX code example loaded to the CC1310 LaunchPad and now we need to program the TX code to the LPSTK.
Now we will focus on loading in custom examples to the LPSTK board using the CC1310 LaunchPad (LAUNCHXL-CC1310) that we have and making a connection between the two with a JTAG cable. Do take note that we could use any other SimpleLink LaunchPad (such as the MSP432 LaunchPad) for this task of programming the LPSTK over JTAG. It is recommended to use the CC1352R1 LaunchPad or the CC1310 LaunchPad if you'd like a way to program the LPSTK and have an RF node it can communicate with. The best setup for many of the examples TI provides is three separate LaunchPad nodes that can play the different roles in the full network stack.
Setup the hardware for programming. You can use OAD to load firmware but this takes some configuration with your app and phone. A more direct way to program it is to attach a JTAG cable.
You do not need the two jumper wires in this example as those are used for serial UART back to the PC / Code Composer, but not necessary in this quick demo. Instead, just use the 10 pin JTAG cable (grey ribbon cable) to connect the XDS110 OUT connector to the LPSTK connector. It is a keyed connector so it should only go in one way.
Remove all the jumpers from the CC1310 LaunchPad. This step is required to program an external target like the LPSTK from the emulator. After we finish programming, we will return the jumpers back to their original positions (8 jumpers in positions GND -> TCK).
- Attach your ARM programming cable (ribbon with 10 pin connectors).
- (optional not needed for this example) Attach your two jumper wires to enable UART serial communication to the LPSTK.
Now we can program software via CCS Cloud IDE. Just like before, we are going to go to Resource Explorer to find the example code, however because we are using the CC1352R1 instead of the CC1310, that means we will be switching SDKs!
We can back up to software folder and collapse the previous SDK we used and instead we will use the one for the CC1352R1 which is the SimpleLink CC13x2 26x2 SDK. Just like before, navigate to "Examples" > "Development Tools" > "CC1352R LaunchPad" > "EasyLink" and click on the "rfEasyLinkTx" sub folder and the "no RTOS" folder. Then the "CCS Compiler" folder and click one more level to "rfEasyLinkTx" to access the project files. This will be denoted by the red cube icon. On the right hand side on the top line above "main.c" there is a little cloud icon that says "Import to CCS Cloud" when you hover over it. Click that and it should open the project in your CCS Cloud workspace. This will open a blank tab which can be closed but you should see the new project appear in your CCS Cloud. As you can see you have many options to use different compilers and to utilize a Real Time Operating System or not.
Curious about RTOS? Check out this workshop
Select the project and click the play button
Now disconnect the LPSTK from the cable and disconnect the cable from the LaunchPad and re-install the jumpers to the LaunchPad. It is also recommended you attach the antenna to the LPSTK for added transmit range. Once you turn the LPSTK to "ON" with the switch you should now see the transmitting effects appear on your CC1310 LaunchPad indicated by the LED blinking. You can verify the behavior by flipping the LPSTK to "OFF" and then to "ON" again and notice the difference on the LaunchPad. We have created wireless transmit and receive between our two microcontrollers!
Code not uploading?
- Check for errors in CCS Cloud debug window. The compiler will tell you what is happening.
- Sometimes your LaunchPad gets stuck or hung up on the previous code. Unplug your LaunchPad and plug it back in to perform a full reset. This is called a power on reset. Sometimes using the RESET button can work but taking away the power and letting the microcontroller fully reset is often best.
- If you have a failure to upload it could be your drivers are not properly installed. Also make sure your USB cable is not power only. Use the one included in the box for best results.
- If you had no problem with the GUI or the first example, your CCS Cloud should be correctly set up. Restart your LaunchPad and refresh CCS Cloud if you encounter any problems. Make sure the serial port is not being occupied by another program like the GUI. You can close the GUI connection by exiting the tab or clicking the chain link icon at the lower left corner.
LED not lighting up?
- The LEDs will light up corresponding to transmitting and receiving. There is very little chance that your LED is broken, but we can verify by blinking a different LED with the same code. You can install the whip antenna for better performance.
- Hit the reset button, sometimes this is needed for the LaunchPad to run the newly uploaded program. Can also try to unplug and replug the USB cable.
Want to restore the BLE Code on the LPSTK?
If you would like to send the LPSTK back to the multi_sensor demo for BLE that is the out of box code you used with the SimpleLink Starter app, you will need to load it with the project. You can find the multi_sensor demo under the CC1352R examples and select the BLE5 Stack.
Before we load in the multi_sensor code, we need to reprogram the BIM. This is the memory for booting up and helps with the OAD capability by saving the current firmware while downloading new firmware in case of interruption and the device needs to go back to the old firmware. If we don't do this first then the LPSTK will reset after we remove the ribbon cable and not boot up in the multi_sensor code.
Now in the left hand navigation under the "Software" folder click the "SimpleLink CC13x2 26x2 SDK..." > "Examples" > "Development Tools" > "CC1352R LaunchPad" > "BIM" and click on the "bim_offchip" sub folder and the "No RTOS" folder. Then the "CCS Compiler" folder and click one more level to "bim_offchip" to access the project files. This will be denoted by the red cube icon. On the right hand side upper corner on the top line there is a little cloud icon that says "Import to CCS Cloud" when you hover over it. Click that and it should open the project in your CCS Cloud workspace. This will open a blank tab which can be closed but you should see the new project appear in your CCS Cloud. Click the green run button to program the BIM firmware.
Go back to Resource Explorer so we can load in the multi_sensor code.
Now in the left hand navigation under the "Software" folder click the "SimpleLink CC13x2 26x2 SDK..." > "Examples" > "Development Tools" > "CC1352R LaunchPad" > "BLE5-Stack" and click on the "multi_sensor" sub folder and the "TI-RTOS" folder. Then the "CCS Compiler" folder and click one more level to "multi_sensor" to access the project files. This will be denoted by the red cube icon. On the right hand side on the top line above "main.c" there is a little cloud icon that says "Import to CCS Cloud" when you hover over it. Click that and it should open the project in your CCS Cloud workspace. This will open a blank tab which can be closed but you should see the new project appear in your CCS Cloud. Click the green run button to get it back to the original BLE code.
Disconnect your ribbon cable and power the LPSTK to the "ON" position. Your blue LEDs should light up again indicating the BLE advertising is back. You should be able to see the SensorTag in the SimpleLink Starter app again like before.
It may take a couple flips of your ON/OFF switch to get the blue LEDs to appear, so try that first if it doesn't appear to work straightaway.
If the example by default doesn't stay in memory, need to go back and do the BIM Off Chip programming which is required to get it to run on startup.Lab 3 - SmartRF Studio demo
For the last example, this will apply to windows users only because of the limitation with SMARTRFSTUDIO but we will showcase how we can view the traffic going over the air. In our case we will open up SmartRF Studio and with our CC1310 LaunchPad still connected to our computer, SmartRF Studio will detect that and we will click into it to start the device configuration.
Here we will scan for devices using the CC1310 LaunchPad as a packet sniffer / spectrum analyzer and we can see when the LPSTK is on and transmitting packets!
1. Open up SmartRF Studio
2. Verify the CC1310 is detected and click the XDS110 connection to jump into device control panel
3. Go to Packet RX tab, change viewing format to "Text" and click start.
4. With the LPSTK off, you should see nothing happening but when you turn it on you should see packets flying. By default the frequency of the TX code is 868MHz, so keep it at that default frequency to verify the packets the first time. You can see the number of packets received and the values print. The basic code will print out all the characters in the ASCII table one at a time in each packet. If you would like to stop the RX you can click the stop button. It will time out by itself after reaching the expected packet count (default 100).
5. You can pass strings that can be read in SmartRF studio by modifying the source code of the LPSTK example for rfEasyLinkTx. You can also modify other radio parameters such as frequency and transmit power in the source code. Once you make those modifications in CCS cloud, you can load in the new firmware to the SensorTag like we did in Lab 2 and then see the changes in SmartRF Studio. You can continue to use SmartRF Studio in your wireless debugging and if you have additional LaunchPads it can be easier to prototype the wireless communications.Conclusion
The learning doesn't stop here. It does get rather complicated past this workshop examples as we only brushed the surface of a single stack and two nodes communicating. As you go to different stacks and larger scale networks, a lot more technical knowledge is required. Move to deep dive into advanced topics with the LPSTK by exploring the SimpleLink Academy.
This resource list is also good for getting started: https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz/f/sub-1-ghz-forum/948081/sub-1-ghz-development-guidelines
You can also get knowledge on IoT and RTOS from the edx course. Get a guided learning experience with Dr. Jonathan Valvano on embedded systems.
There are also quite a few things that could be done with your CC1310 LaunchPad and CC1352R1 LPSTK. Check out the examples available in the SimpleLink SDK in the TI Resource Explorer and many references designs on ti.com.
TI Resource Explorer: https://dev.ti.com/tirex/explore/node?node=AErO6JTn4jgRBgt5VuJVhw__pTTHBmu__LATEST
Connect series: https://training.ti.com/connect-simplelink-mcus
There are also many design projects on hackster.io featuring the LaunchPad.
------------Apply to TI
Interested in applying for TI internships and Full-time opportunities? Check out what's next at careers.ti.com. Be prepared for interview season at the beginning of each semester. Review your fundamentals from circuits and other classes. Apply online to as many opportunities as you can and visit TI at the career fairs at your school.Experimental Arduino stuff
1. Download and install the latest version of Arduino IDE (1.8.13). https://www.arduino.cc/en/software/and get the installer for your operating system Windows, Mac, Linux. Windows people should also install the Energia Drivers from this link if they did not run the GUI tool at the beginning: http://s3.amazonaws.com/energiaUS/files/energia_drivers.zip
2. Put the following link into the Arduino preferences -> Additional Boards Manager URLs. Also check the box for show line numbers if you like that and adjust your font size if you would like it bigger.
3. Go to Tools > Boards > Boards Manager and scroll to the bottom of the list with Energia CC13x2
Note: this step takes a few minutes, leave time for the install between 10-20 minutes.
4. After the install completes, You need to select the board and COM port in Arduino IDE. Go to Tool > Boards and now you should see the "Energia Red Boards" > "Red LaunchPad " and make sure this is selected.
5. You also should select the correct COM port. Go to Tools > COM port to chose from available options. The LaunchPad populates two COM ports. MacOS users will see Port 001 and 004 populated, please use Port 1. Windows users can verify their COM port by going to Device Manager and finding the XDS110 UART.
After this is completed you will also want to get the board support package for CC13xx or MSP432 if you want to program to program the SensorTag with those boards or also want to program those boards.