Embedded Systems & Firmware

What can be done through debug interfaces such as JTAG and SWD?

  1. AHalt or single-step the program on the real board, inspect registers and variables, and program flash
  2. BChange the microcontroller's manufacturing process
  3. CAutomatically translate the program into another language
Show answer and explanation

Answer: A. Halt or single-step the program on the real board, inspect registers and variables, and program flash

JTAG and Arm's SWD connect the on-chip debug circuitry to a debugger on a PC. You can stop at breakpoints to examine variables and registers, step one instruction at a time and program the flash. They reveal internal state even where printf cannot be used. When shipping a product, the debug function may be disabled so that third parties cannot read out the firmware.

  • A. Correct. It is an essential embedded development tool.
  • B. It has nothing to do with manufacturing.
  • C. It is not a translation function.
Practice this topic Back to topic

More Embedded Systems & Firmware questions

  1. You want to run a control calculation every 1 ms on a microcontroller without an OS. Which implementation is most suitable?
  2. What is the role of a microcontroller's brown-out detector (BOD, brown-out reset)?
  3. On a microcontroller with interrupt priorities, a higher-priority interrupt occurs while a lower-priority handler is running. What generally happens (assuming nesting is allowed)?
  4. In C, which statement sets only bit 3 of register reg to 1 without changing the other bits?
  5. In C, which statement clears only bit 3 of register reg to 0 without changing the other bits?