2016-02-15 11:16 PM
Hello there,
I have a general question regarding the NJTRST signal in a JTAG protocol. In STM32 datasheets, I read that JTAG can operate with only 4 pins, without NJTRST. I only assume it then uses regular #RESET pin to acomplish the goal? Please correct me if I am wrong. Also in the specification, what is confusing for me, it doesnt say anywhere that the regular #RESET pin is needed at any point: https://www.dropbox.com/s/j7ygboalkyuo6zs/Zrzut%20ekranu%202016-02-16%2008.14.08.png?dl=0 I would really apreciate if one could explain me briefly the difference between NJTRST and #RESET, how they are needed otr not for JTAG. I know that NJTRST is some kind of inner reset for JTAG logic.2016-02-16 1:16 AM
I have not used jtag with STM chips...
The more modern approach is to use ''SWD''. This is a two wire protocol, even though SWD stands for single wire debug. For SWD you need GND, SWCLK, SWDIO. The connectors on the ''discovery'' boards also have VCC, and reset. And a sixth signal that I don't remember / don't connect on my boards. I've found that the hardware reset from the debugger is sometimes necessary to make the chip behave as specified in the manual. Might be a software issue with my debugging software, but issuing the hardware reset has made the chip behave reliable. Is there a good reason you're inquiring about JTAG?2016-02-16 1:22 AM
I am just wondering about the need of the TNJRST pin. Also I use JTAG whenever I can (whenever I have enough pins) because I think it is more reliable and faster than SWD. Maybe I am wrong.
2016-02-16 1:35 AM
The more modern approach is to use ''SWD''. This is a two wire protocol, even though SWD stands for single wire debug.
It's a one wire protocol, the second wire is used for the clock. All the data goes trough one wire, both direction.2016-02-16 10:11 AM
For SWD, you need to connect the NRST pin if you want to debug through OpenOCD/ST-Link. If you just want to program it, you don't need this pin.
It may be the same for JTAG, but I haven't used it.2016-02-16 10:25 AM
Thats not true. NJTRST is not even a part of JTAG circuit:
https://www.dropbox.com/s/ji9rvuh4i4tuz0t/Zrzut%20ekranu%202016-02-16%2019.26.11.png?dl=02016-02-17 1:25 PM
The TRST pin is an optional active-low reset to the test logic - usually asynchronous, but sometimes synchronous, depending on the chip. If the pin is not available, the test logic can be reset by switching to the reset state synchronously, using TCK and TMS. Note that resetting test logic doesn't necessarily imply resetting anything else.
It also means that either you don't use JTAG reset line function at all or use TRST, never generic RESET (which will reset whole chip and confuse debugger, your debug session and you including). Source: