SWD is a 4 wire JTAG interface with no hardware reset. JTAG has more wires but also has reset line to reset the processor using a hardware line (the processor could get into a mode where you might not be able to reset the processor with a software debug command, at which point you would have to power cycle it. ) The JTAG interface can also be run in a SWD "mode" where your only using 2 wires for communication.
There are several ways to program a STM32, (External Flash, USB, External ROM) but they require code to be running on the procesor so initially you'll need a bootloader and programming. You'll need the SWD or JTAG for debugging anyway.
Programming Methods of AVR Microcontroller, Parallel Programming, ISP, Boot Loader, JTAG for ISP 👇
JTAG versus SWD programmers 👇
JTAG stands for Joint Test Action Group (the group who defined the JTAG standard) and was designed as a way to test boards. JTAG allows the user to talk to the bits and pieces of the microcontroller. In many cases, this involves giving them a set of instructions or programming the board. The JTAG standard defines 5 pins:
TCK: Test Clock
TMS: Test Mode Select
TDI: Test Data-In
TDO: Test Data-out
TRST: Test Reset (Optional)
The reduced pin count JTAG definition really only consists of 2 pins:
TMSC: Test Serial Data
TCKS: Test Clock
TCK: Test Clock
TMS: Test Mode Select
TDI: Test Data-In
TDO: Test Data-out
TRST: Test Reset (Optional)
The reduced pin count JTAG definition really only consists of 2 pins:
TMSC: Test Serial Data
TCKS: Test Clock
ARM Debug Interface v5 Architecture Specification (2006) 👇
ARM Debug Interface v5.pdf
1.3 MB
ARM Debug Interface v5 Architecture Specification (2006)
Buzzer abd relay can not directly connect to microcontroller or FPGA and a buffer must be in middle 👇
امکان اتصال مستقیم بازر و رله به پایه های میکروکنترلر و FPGA معمولا وجود ندارد و باید سر راه پایه ها بافر گذاشت. ترانزیستور BJT معمولا انتخاب مناسبی برای بافر است. دیود شاتکی سریع هم جریان بار سلفی رله را در خود تخلیه می کند 👆