• Resolved

Use of JTAG pins on EVB LM3S8962

Hi there,

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?

  • Alexandre,

    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 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. 



  • In reply to Sean de la Haye:

    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 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.

  • In reply to cb1_mobile:

    Thank you both, Sean and cb1_mobile.

    Both points of view will help me improve my project develoment.