Stellaris One Day Workshop
From Texas Instruments Embedded Processors Wiki
Version 1.4 July 2010
Contents |
Introduction
The Stellaris(R) One Day Workshop is a quick introduction to the Stellaris product line including:
- Introduction to the Core
- Available kits and modules
- Code Composer Studio 4.1 Installation and Getting Started guides
- Code Composer Studio 4.1 Starting from a blank page guides
- Using the Flash Programmer
- LM3S8962 and LM3S3748 Getting Started guides
- CAN Peripheral overview and lab
- Ethernet Peripheral overview and lab
- USB peripheral overview and lab
You can download and view each module separately. Each one includes presentation material as well as instructions for the labs. We will be adding a recorded presentation of the material in the near future.
Attend a Live Workshop
You can find the workshop schedule and enrollment information for a live Stellaris workshop here: [1]
Running The Labs
In order to run the labs, you will need:
- A Windows XP/Vista or 7 PC with a free USB and a free Ethernet port
- Adobe Reader [2]
- Java runtime [3]
- Code Composer Studio 4.1
- StellarisWare installation for your board [4]
- LM3S3748 or LM3S8962 evaluation board [5]
Workshop Contents
- Cover Page
- Introduction
- CCS and Evaluation Board Quickstart labs presentation
- CCS lab steps
- Flash programmer lab steps
- 3748 Eval Board Application Quickstart steps
- 8962 Eval Board Application Quickstart steps
- CAN Peripheral presentation and lab steps
- Ethernet Peripheral presentation and lab steps
- USB Peripheral presentation and lab steps
- Addendum
Technical Details
Here are some technical details that fall somewhat outside the boundaries of a typical one day workshop that might be nice to know during development:
- Core revisions
Sandstorm class is Cortex-M3 r1p0 (release 1, patch 0). Fury and Dustdevil classes are Cortex-M3 r1p1 (release 1, patch 1). Tempest class is Cortex-M3 r2p0 (release 2, patch 0). The Cortex-M3 errata describes what is different in the revisions, but in general, they're not user-visible issues. Between r1p1 and r1p2 the fixes are primarily in the embedded trace module (ETM), which is not on Stellaris MCUs. ETM is an old technology designed for use on MPUs with caches. Because Stellaris has SWD technology in Cortex-M3 MCUs, along with instruction and data breakpoints and flash patching, adding the ETM is overkill -- unless you're in automotive applications, which we are not. Also see these sticky posts on the e2e forum [6] [7]
- Tempest prefetch buffer
Tempest parts have a predictive look-ahead on their prefetch buffers. This increases the success rate to the 90+% range.
- VDDA
The analog supply (VDDA) supplies the internal LDO on the core of some devices. Not connecting this supply because your design doesn’t use ADC, comparators etc. is not a good thing! See LM3S6965 data sheet.
- Ethernet Peripheral
Some of the reference schematics do not show either the VDD_PHY pins or the required crystal. It would be best not to forget these.
- Ethernet and Web Issues
When setting the IP addresses during the 8962 lab, your PCs Ethernet card needs to have the same address as shown on the 8962 display ... PLUS 1. Actually you only need to have the last of the four fields different from the board's address. You should also assure that your proxy is OFF. If you see that the maze game box is gray on your browser, you need to download the Java runtime engine.
- Serial Flash Loader
The “Serial Flash Loader” is a stand-alone loader that is preprogrammed in production devices, that allows you to load an application using the LMFlash programmer or command line program, by only connecting to SSI or UART – no emulator/debugger interface needed. The evaluation kits come with the Quickstart app preprogrammed in flash which does NOT include this serial flash loader. You can program the serial flash loader “bin” file using the emulator, to program a device just like you would get it from the factory. You could then test it on the eval board using the COM port emulator over USB, using the LMFlash to program the flash via the UART (you’re still connected via the USB port, but not using the emulation hardware or the IDE to do the programming).
- Stellaris Boot Loader and Booting from USB
The “Stellaris Boot Loader” is a piece of code that you include at the beginning of flash along with your application that allows booting from SSI, UART, I2C, ENET or USB. None of the parts can program flash memory using USB straight from the factory. Parts that have ROM have a boot loader in ROM that can use UART0, SSI0, I2C0, and Ethernet to program flash. Parts that don't have ROM have the Serial Flash Loader in Flash memory that can download with UART0 or SSI0. You can use the ROM boot loader or the Serial Flash Loader to download the Flash-resident boot loader which uses UART0, SSI0, I2C0, CAN, Ethernet or USB. In order to boot from USB, you would first download the boot loader using one of the other available interfaces and then you could use USB. You do need an external crystal or oscillator to use the USB interface.
- Using the on-board emulator for a second board
Nearly every Stellaris board has a JTAG interface that can be used for emulation and programming of other boards ... either target boards or Stellaris boards that do not have on board emulation (like the 2110). You should note that the JTAG cable may or may not provide power to the target board ... so you may have to provide power separately. In the case of the 2110 and the 8962 boards, connecting the CAN cable will provide power to the 2110 board.
- USB Descriptors
The Vendor ID (VID) and the individual Product ID's (PIDs) are in the file “usb-ids.h” in the usblib folder. The definitions are: //***************************************************************************** // // Luminary Vendor ID. // //***************************************************************************** #define USB_VID_LUMINARY 0x1cbe //***************************************************************************** // // Product IDs. // //***************************************************************************** #define USB_PID_MOUSE 0x0000 #define USB_PID_KEYBOARD 0x0001 #define USB_PID_SERIAL 0x0002 #define USB_PID_BULK 0x0003 #define USB_PID_SCOPE 0x0004 #define USB_PID_MSC 0x0005 #define USB_PID_AUDIO 0x0006 #define USB_PID_DFU 0x00FF The string descriptors are initialized in each of the examples, in the case of the usb_dev_mouse project, the file “usb_mouse_structs.c” has the initialization code for the strings that get passed during enumeration to the HID class on the host. This is where the “Texas Instruments” manufacturer string is initialized, along with “Mouse Example” for the product string. There are some other strings there as well. Note that the VID/PID is just a number, and you can make the strings say anything you like. The way I understand this, a customer can obtain permission to use the TI VID and PIDs, but they can make the manufacturer description their own company name and product name.See [8]
- Portable Code Composer Projects
http://processors.wiki.ti.com/index.php/Portable_Projects
- Programming the MAC Address
Stellaris parts have four 32-bit non-volatile user registers that can be used for storing things like MAC address or unique device serial numbers. These registers can be programmed by firmware running on the device or by using the LM Flash Programmer over JTAG. Once these registers are committed to Flash, they can only be changed by executing a device unlock sequence which completely erases the Flash. You can read more about this in the device datasheet (e.g. see Section 7.3.3 of the LM3S9B96 datasheet).
- Issues with CCS and IAR
We've seen the following behavior ... We had a PC running the IAR tools that worked fine. When CCS 4.1 is loaded, something in the process “steps” on the IAR driver and replaces it with the driver from CCS. You have to go to Device Manager and put the correct IAR path back in for it to work properly. If you decide to run CCS you must go back and change the path to point to the CCS driver. See FAQ - CCSv4#Q:_CCE_MSP430_no_longer_works_after_installing_CCSv4.3F for more information.
- IEEE 1588 Discussion
There is some discussion of 1588 issues in the forum: [9]
- How to keep CCS from erasing the boot loader
A good thread in the forum: [10]
- Creating a Transportable Code Composer Installation
For those times when CCS refuses to operate properly on a customer's machine ...
1) On a known good PC, install CCS to an easy to find location (i.e. C:\TI_CCS)
2) Copy the CCS installation folder to a USB stick.
3) Copy the folder from the USB stick to another PC. You must use the same folder name as in step (1) or CCS
will not work.
4) Add a shortcut to the desktop to C:\TI_CCS\ccsv4\eclipse\eclipse.exe
The device drivers that are normally installed by the CCS installer will not be present. To install them for a
Stellaris board:
Connect the Stellaris on-board emulation USB to the PC.
When the Windows install device driver dialog pops up, select the option to install from a specific location, and
then browse to C:\TI_CCS\ccsv4\emulation\drivers\stellaris\ftdi
Allow windows to install the FTDI driver from there.
There are actually two drivers required, so after the first driver is installed, you will get a second Windows
driver installation dialog. Select the same option and browse to the same location as above. Allow windows to install
the second driver from there. If you are using something other than the Stellaris on-board emulation, it will be
necessary to install the drivers for that particular emulator. The procedure would be the same: plug the emulator
into the PC and browse to the location of the *.INF file for that particular device.
Instructor Materials version 1.4 July 2010
Create the installation flash drive by placing these two items on the drive:
The CCS 4.1 Full installation: CCS Download The Stellaris ODW folder:[11]
The presentation PowerPoint slides are here:[12]
A folder containing the full-day, half-day and lunch and learn pdfs is here, ready for printing:[13]
Instructor Forum
A forum for the instructors for this workshop has been created here [14] to share "lessons learned" and correct errors. This forum is currently on the Luminary Micro website. You will have to login to access the forum. Your input is appreciated!
Leave a Comment
