Yesterday I locked the MCU in my Evalbot. It was a result of flashing a wrong configuration of clock sources and dividers. I must have set the crystal frequency wrong and JTAG was no longer responding. At first it seemed to be dead totally, but then I found a software from TI named LM Flash Programmer. It has an option to unlock the MCU by erasing flash of the device, after we put it into a state before the flash is executed by asserting a reset on power up.

So, off we go:

1. The markings on my chip are:

LM3S9B92, IQC80B1XA

B1 here denotes the revision of the chip, what will be important later on.

2. Turn on LM Flash Programmer (it can be found here http://www.ti.com/tool/lmflashprogrammer). I used build 1381- the current one on the day of writing this post. When you choose the connection settings check what board do you have and even more important what crystal is on the board. When I chose “Lm3s9b92 Evaluation board” it specified 16Mhz crystal (the one on the board is 6MHz only), so I think that is a different board and there is no choice for evalbot. So the manual settings with ICDI, 1MHz Jtag, 6MHz crystal are fine.

3) The Port Unlock function that is of interest to us is located on Other Utilities tab. My MCU turned out to be (after a google search) to be a Tempest class, so this was the proper option to choose.

After clicking Unlock and reading the warning about erasing MAC address from flash (I think LM3S9B92 doesn’t come with any MAC programmed in, but either way there was no other choice) as well as all the other data located there, this window showed:

4) What that means is that according to the MCU data sheet “section 4.3.4.3 Recovering a “Locked” Microcontroller” we need to assert ~RST signal and then turn on the power (the specific pin could be different in other models). In this case it means to tie it to the ground (it is a negated pin). From the Evalbot schematics (www.ti.com/lit/ug/spmu167/spmu167.pdf) we can see that the ~RST pin has no information about the test point assigned to is (schematics are not complete, but still useful). The nice fact is that this pin is a part of JTAG, so most probably it should be also on the additional connection for this interface. After finding the pin on the pin layout in datasheet:

5) We can locate the connection on the JTAG pins with the multimeter:

The connection to the ~RST pin is located on the JTAG on the top row, most left (looking in the way that you can read the JTAG label on the PCB. My board is a bit different then on the schematics and placement figure from TI, so this little investigation was necessary.

6) Remove batteries, unplug usb ( if you don’t have a diode connecting ICDI to power, remove both of the cables- one connected to USB DEVICE port, and other ICDI port ), Tie RST pin to the ground and then plug in the power (both usbs) and turn the EVALBOT with the ON button. This should result in putting the MCU in the state that is not dependent on the flash content (the proper pin assignments and proper clocking). Now you can click ok on the dialog in LM Flash programmer about asserting reset. It will tell you to remove the ground from reset- do it.

7) Now if you are lucky it may be enough to click ok and the MCU should be unlocked (what will be confirmed with a proper dialog window). If you have a defective revision (keep in mind that I have a B1) you may have to do some more witchcraft. This is the information I found on TI forum (written by “Stellaris David” on of TI employees):

Hello,

Are you able to unlock the part using LM Flash Programmer? Please give it a try. After erasing the part, try and load the default example once more.

Be aware, with the LM3S9B92 Rev B1 you need to follow a slightly modified procedure to unlock the part. This is located in section 1.2 of the Rev B1 errata document:

1.2 The Recover Locked Device sequence does not work as expected

Description:

If software configures any of the JTAG/SWD pins as GPIO or loses the ability to communicate with the debugger, there is a debug sequence that can be used to recover the microcontroller, called the Recover Locked Device sequence. After reconfiguring the JTAG/SWD pins, using the Recover Locked Device sequence does not recover the device.

Workaround:

To get the device unlocked, follow these steps:

Power cycle the board and run the debug port unlock procedure in LM Flash Programmer. DO NOT power cycle when LM Flash Programmer tells you to.

Go to the Flash Utilities tab in LM Flash Programmer and do a mass erase operation (check ”Entire Flash” and then click the Erase button). This erase appears to have failed, but that is ok.

Power cycle the board.

Go to the Flash Utilities tab in LM Flash Programmer and do another mass erase operation (check “Entire Flash” and then click the Erase button).

-David

If you are reading this David, thank you- it was a great information, which I didn’t catch when looking through Errata. In my case the initial unlock and erase seemed to work (there was no information about the error), but I still did double erase to be sure. Still the information is great in case you have B1 revision (mine is from the big promocode that was published on Hackaday and then turned out to be limited to Boston conference attendees).

Hope this info will help at least one person that locked their LuminaryMicro/TI microcontroller. Evalbot is a great way to learn some of the operation of LM’s and how to operate ethernet with mcu.

My first master thesis was a ECG system that was supposed to communicate with the PC or PPC by bluetooth. It turned out rather well (except that the enclosure was a bit rough). The hardware was a self designed pcb with st-micro arm7 processor. It runs FreeRtos and some nice features- adc does most of signal acquisition with DMA up to the point of putting it all in the queue. All the design files and master thesis pdf is given below.

You may need sources for FreeRTOSV5.2.0, code sorcery arm lite compiler suite to compile the sources, and some way to put it in the processor if you would like to play with the code. I have it all somewhere if anybody is interested, but it should be easily available on the net. I used usb-uart 3.3v converter to upload the code(no way to debug by wire in my case).

The signal flow based on timer triggered ADC and DMA transfers

PCB was designed to be compact and keep the most noise sensitive signals far from DC/DC converter.

What is also interesting is the organization of different tasks- some were responsible for ADC and some for menu on lcd and button debouncing.

Past three days I’m working on turning on the sound output on my Evalbot based on stellaris chip. It has a nice sound chip TLV320aic3107 that is controlled through I2C and fed with data through I2S. I must say that it takes a great deal of fiddling with registers of this little thingy to get it to output anything on the speaker through D class amp. The code I used to set all the values is below:

According to datasheet the registers 86 and 93 ( Output Level Control Register) have D0 bit only readable and not writable.

If D0 = 0 then LOP is not fully powered up, if D0=1 then LOP is fully powered up. So if you won’t set a bit that is supposed only to be read then you get only a very faint quiet sound (the oscilloscope doesn’t show any wave even on 20mV range, but you can still barely hear it on the speaker). I would assume that it is just some crosstalk from the input of LOP to the output.

After correcting the bit to 1 the sound is great and loud. Success.

The sourcecode I use is here Ethernet_stellaris it is developed under CoIDE with CoOS realtime operating system.

Edit: I asked about the subject on the TI’s forum and I hope it’s ok if I put it here:

This code goes to page 14 to disable some features that were not released on the AIC3107. There are no user options and the exact sequence is needed to insure that the Class D operates as intended. Since there are no user options we don’t specify the details of these registers.

For my second master thesis I wrote a generator of VHDL multiplier modules. Software was written in C# and allows to implement several algorithms of multiplication of inputs upto 128bits (for some cases more) and with different sign representation of input/output. I hope it can be useful for some of you guys.