cancel
Showing results for 
Search instead for 
Did you mean: 

Remap of JTAG Pins during Debug Session

thorsten23
Associate II
Posted on April 02, 2009 at 12:02

Remap of JTAG Pins during Debug Session

5 REPLIES 5
thorsten23
Associate II
Posted on May 17, 2011 at 13:08

Hi all,

I'm developing a product based on the STM32F103VE. I'm using both I2S Interfaces. The I2S3 is mapped on the JTAG Pins TMS and TCK. For debugging I use the SWO Interface, so I actually don't need the TMS and TCK pins for debugging.

My problem is, that it seems I can't remap the TMS and TCK pins during a debug session so that I can use the I2S3 peripheral during debugging. When I start the board without debugging, the remapping works fine as it should.

Am I doing somesthing wrong? Is there any way to use I2S3 at the same time as debug via SWO?? This would be very important to me!!

Thanks for any hints!!

Thorsten

thorsten23
Associate II
Posted on May 17, 2011 at 13:08

sorry, I mentioned the wrong pins above!

The I2S3 peripheral is mapped on the JTAG Pins TDI and TDO, and not the TMS and TCK....

sorry....

But the question and the problem stay the same.

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

Understand what you're trying to do - we also use/like SWD - we also have run into difficulty when re-mapping JTAG pins. (not just on STM32 but with other Cortex devices, too)

Others may have a better solution - and this may not work in your case - if the I2S peripheral is ''only'' available on ''shared'' JTAG pins. We leave the JTAG pins in their JTAG mode - and develop our code on other/safe pins - during debug. Once working - it is not too difficult to port to the desired pins - causing loss of debug from then on.

Wish I had something better to offer - maybe this gains you some progress...

thorsten23
Associate II
Posted on May 17, 2011 at 13:08

It's a good idea to develop the way you describe, but just as you

guessed, the i2s3 pins are only mapped on the jtag pins :-[

so i can't debug my whole project... so back to the good old uart debugging....

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

Inspired by your response - one more guess/suggestion: (strictly theory - we've not tried or cohorts failed/hid results from me)

Perhaps you can start out in JTAG mode - and exit to ALT_FUNT mode to perform I2S - and then revert to JTAG - ALL under program control.

Caution - we started with older Cortex parts - which had the annoying ability to ''lock you out of JTAG forever!'' Cure was to write a safety loop - at top of your code - to switch back to JTAG mode upon a unique input condition. BEFORE you attempt my ''guess'' above - be sure that you understand and have implemented such a ''JTAG-recovery'' mechanism.

Good luck - let us know...