cancel
Showing results for 
Search instead for 
Did you mean: 

JTAG and SPI1

hassan_mj
Associate II
Posted on December 16, 2009 at 02:19

JTAG and SPI1

2 REPLIES 2
hassan_mj
Associate II
Posted on May 17, 2011 at 13:34

I have to use SPI1 port which is shared with JTAG. Will I be able to debug my firmware while I am using the SPI port, or this is not allowed and the JTAG will be confused.

Thanks

jj
Associate II
Posted on May 17, 2011 at 13:34

Hi-

You've identified a potential problem ''before'' causing yourself trouble - good for you.

As you sense - ''appropriating'' JTAG pins for other purposes will most always defeat the JTAG.

What to do? If your chip has a 2nd SPI port suggest that you develop your software on that port. (in this way you keep your JTAG functionality) After you're done/satisfied - carefully alter this code to the alternate function pins which are shared with JTAG. Doing this - you will lose JTAG.

One trick - very early in your code - ''before'' you change pins from their default JTAG - read a switch which - when active - will prevent the switch of the JTAG pins to alternate function (or GPIO). In this way - you can quickly/easily recover JTAG operation without resorting to more complex, time-consuming methods.

Hope this helps...