TI E2E Community
Stellaris® ARM® Microcontrollers
Stellaris® ARM® LM3S Microcontrollers Forum
Use of JTAG pins on EVB LM3S8962
is it possible to use JTAG pins (TRST/PB7, SWCLK/TCK/PC0, SWDIO/TMS/PC1, TD1/PC2 and TD0/CP3) of LM3S8962 Eval Board as GPIO's outputs or inputs?
Yes, it is possible, but not recommended. You will not be able to use JTAG to reload your code unless your application supports other methods for flash programming. If it happens that your device is "locked", then you will need to do the procedure outlined in section 22.214.171.124 in the 8962 datasheet.
If you are sure you wish to proceed, then the steps for unlocking the GPIO ports is in 8.2.4.
Agree w/Sean - however there is another method - and it has advantages! Long ago appeared file, "gpio-jtag.c" - which provides an in-built mechanism to recover JTAG without the complexity/effort outlined in section 126.96.36.199 MCU Datasheet. This method may cost you a single GPIO - or not - depending upon your inventiveness and/or the extent of resource implementation by your application.
This gpio-jtag "switch-over" employs a GPIO or timer or some other controllable event to "cause" the "jtag pin switch-over." You may even extend the basic application so that the switch-over may only occur during a limited time-frame - post power up. During development we employ JTAG as the default mode - (do nothing) holds us in JTAG. Once your application is programmed/debugged/test-verified you can switch the default to GPIO - meaning you have to cause a "special" event to "re-purpose" the GPIO to JTAG.
The basis for this switch-over is the fact that the ARM MCU defaults into JTAG upon power-up. By placing this special "switch-over" software before your code "repurposes JTAG pins to GPIO" - you can prevent the JTAG pins from switching to GPIO.
Early (smaller) Stellaris may not be recoverable via LMI Flash Programmer - re-purpose of these MCU's JTAG may thus prove fatal. Use of this simple, software "Defense mechanism," solves this issue and we believe has the advantages of simplicity and speed when compared to the alternate method (LMI Flash Programmer) of MCU JTAG recovery.
Thank you both, Sean and cb1_mobile.
Both points of view will help me improve my project develoment.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.