cancel
Showing results for 
Search instead for 
Did you mean: 

JTAG connections for STM32G474 controller

Nsg1987
Senior

Hello,

I am connecting STM32V2 debugger at following pins. 

Nsg1987_0-1719397754368.png

 

This supports SWD. I want to use JTAG pins and want to use STM32V2 debugger as a JTAG connection for debugging purpose.

 

can you support me how to connect or which pins to be used and what is the procedure to change from SWD to JTAG mode?

 

Regards,

Nikhil 

 

8 REPLIES 8
Andrew Neil
Evangelist III

@Nsg1987 wrote:

want to use STM32V2 debugger


Do you mean ST-Link V2 ?

https://www.st.com/en/development-tools/st-link-v2.html

Note that this does support SWD.

 


@Nsg1987 wrote:

can you support me how to connect or which pins to be used


That will all be in the Datasheet; see also the Reference Manual - both available on the 'Documentation' tab of the Product Page:

https://www.st.com/en/microcontrollers-microprocessors/stm32g474ve.html#documentation

Nsg1987
Senior

I used the pins for JTAG as below. 

Nsg1987_0-1719898297576.png

But i am getting below error .

Nsg1987_1-1719898336534.png

Can you let me know how to solve the error and connect the JTAG?

 

Regards,

Nikhil 

 


@Nsg1987 wrote:

I used the pins for JTAG as below. 


That's just the complete pinout list for the ST-Link - so doesn't really tell us anything.

Show your schematic with how you connect the ST-Link to the chip.

Can you connect over SWD ?

Why is it that you require JTAG rather than SWD?

Nsg1987
Senior

 

Hello @Andrew Neil 

Below is the connection diagram between ST-LinkV2 and MCU.

Nsg1987_0-1719980147615.png

SWD connection works fine but we have observation that when MCU is in debugging mode and MCU is generating PWM pulses for power circuit, the moment power circuit starts to draw the power, MCU comes out of the debugging and we are not able to watch the various parameters in watch window. Hence, we would like to go with JTAG and want to debug the code during power circuit in operation.

 

Thanks,

Nikhil 

 

Looks right - apart from the switch:

AndrewNeil_1-1719997970237.png

Are you sure you have the correct pin numbers for the MCU?

 


@Nsg1987 wrote:

SWD connection works fine but we have observation that when MCU is in debugging mode and MCU is generating PWM pulses for power circuit, the moment power circuit starts to draw the power, MCU comes out of the debugging and we are not able to watch the various parameters in watch window. Hence, we would like to go with JTAG


What makes you think that JTAG won't suffer the same effect?

Sounds like you have an underlying EMC issue which needs addressing ...

Or there's some conflicting pin usage?

Also watch out for low power modes or brown out. Perhaps get visibility of the NRST line on a scope?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Tesla DeLorean wrote:

Or there's some conflicting pin usage?


Indeed - still haven't seen a full schematic from @Nsg1987 

Nsg1987
Senior

Hello @Andrew Neil & @Tesla DeLorean 

In order to avoid conflict of pins, we tried to use JTAG connector of B-G474 evaluation board. The CN1 connector of B-G474 board is connected to JTAG connector of ST-Link V3 debugger. 

Nsg1987_0-1720151800627.png

 

we took care of shorting SB28 solder bridge and to remove R89 to use CN1 as a JTAG of B-G474 board.

Nsg1987_1-1720152009466.png

ST-Link V3 JTAG

To our surprise, we are still getting above error.

Here we made sure that the JTAG pins of B-G474 is not conflicting with any other.

 

Regards,

Nikhil