JTAG connections for STM32G474 controller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-26 3:31 AM
Hello,
I am connecting STM32V2 debugger at following pins.
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
Solved! Go to Solution.
- Labels:
-
STM32G4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 4:57 AM - edited ‎2024-07-15 5:08 AM
>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.
So forget your "jtag will solve my problems idea" - connecting with jtag will show same behaviour.
Best solution: dont debug, while power circuits running. (Or : only possible solution, depends on the "power" of your system there. )
I work on inverters with 1...120 kW output - and believe me, nothing will work reliable with some low level cable connected to debug - even on (potential free) Laptop, when inverter starting.
Maybe with Laptop (running on battery supply) + isolated debug adapter ...it might work.
This you could try... ST-LINK/V2-ISOL , to have swd debug connection on running power unit.
Usually i debug on a simulator and on big inverter only by serial "debug" printf (not sensible to every small spike).
+
btw
My impression : st-link V3 more sensitive to small EMI/spikes on ground than V2 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-26 3:39 AM
@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
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-01 10:32 PM
I used the pins for JTAG as below.
But i am getting below error .
Can you let me know how to solve the error and connect the JTAG?
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-02 1:57 AM
@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?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-02 10:27 PM
Hello @Andrew Neil
Below is the connection diagram between ST-LinkV2 and MCU.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-03 2:15 AM
Looks right - apart from the switch:
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 ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-03 4:35 AM
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?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-03 4:52 AM
@Tesla DeLorean wrote:Or there's some conflicting pin usage?
Indeed - still haven't seen a full schematic from @Nsg1987
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-04 9:01 PM
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.
we took care of shorting SB28 solder bridge and to remove R89 to use CN1 as a JTAG of B-G474 board.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-15 2:11 AM
Is there any other way to do so.
regards,
Nikhil
