Questions tagged [debugging]

The process of identifying, quantifying, and correcting errors in the operation of a system

Debugging is a process of finding and correcting errors that occur in a system. This tag should be used for any questions asked about debugging a circuit / roadblocks encountered while debugging a circuit.

527 questions
66
votes
4 answers

JTAG vs SWD debugging

After skimming through this article , I am wondering what are the benefits of SWD debugging over JTAG debugging? I understand SWD uses less wires/pins, takes up less space etc. But how does it play out in terms of performance, features and cost of…
josef.van.niekerk
  • 3,750
  • 10
  • 50
  • 65
33
votes
6 answers

How did smacking electron tube TVs help?

In old movies (or new movies playing in these times), I often see people smacking the top of electron tube TVs or screens. Somehow it seems to help to stabilize/sharpen the picture. But why? Are there any reasons an electronic circuit could go from…
OddDev
  • 589
  • 5
  • 11
28
votes
3 answers

The mysterious case of the random leakage current

Disclaimer: I already know the solution of this circuit debugging conundrum (and it is not trivial), and I'll post it after some time, so that other people could give their contribution to this mystery story! I think it may have some educational…
27
votes
2 answers

Anti-static bags - safe to support powered circuit boards?

Is it generally safe to rest a low voltage powered up circuit board on an anti-static bag when debugging? A simple meter reading suggests it is a good insulator, but it must conduct to some extent? Ditto on anti-static mat on the workbench
Dirk Bruere
  • 14,511
  • 10
  • 66
  • 127
26
votes
5 answers

What could cause a microcontroller to unexpectedly reset?

One particularly irritating variety of bug in a microprocessor-controlled system is for the microprocessor to unexpectedly reset. An important tool for debugging this kind of problem is a list of possible causes. What could cause a microcontroller…
Stephen Collings
  • 17,933
  • 19
  • 103
  • 195
26
votes
1 answer

Laptop motherboard not working, quiet clicking noise

Intro how it happened: I had cleaned my laptop from dust and reapplied the thermal paste. After this i have reassembled the device than it did not turned on. Then i took it apart connected the fan and it worked even POWER led was lit. Skipping the…
Levente
  • 455
  • 4
  • 12
25
votes
8 answers

How do you attack a new board?

You get your PCB back from the manufacturer. It is a new design, you have of course bread-boarded all the major parts, but you know there are going to be problems. There are just too many things that can cause problems, e.g.: Errors in the schematic…
morten
  • 4,753
  • 4
  • 31
  • 26
23
votes
4 answers

JTAG debugging AVR

Can anyone advise what hardware and software is required for debugging AVR in circuits?
JohnC
  • 4,839
  • 3
  • 28
  • 20
20
votes
1 answer

How do I print debug messages to gdb console with STM32 discovery board using GDB, OpenOCD and arm-none-eabi-gcc?

I'm programming an STM32 Cortex M0 discovery board (32F0308DISCOVERY) using OpenOCD, arm-none-eabi-gcc, and gdb. I was wondering if there is any straightforward way to log debug messages over SWD. I've read about the semihosting option, but this…
foldl
  • 621
  • 1
  • 6
  • 14
20
votes
8 answers

Why is printf() bad for debugging embedded systems?

I guess it's a bad thing to try to debug a microcontroller-based project using printf() . I can understand that you have no predefined place to output to, and that it could consume valuable pins. At the same time I've seen people consume a UART TX…
tarabyte
  • 3,242
  • 10
  • 54
  • 75
18
votes
2 answers

How to find the problem of this old Marantz amplifier?

After a first question referring to resistor symbols, I'm back with this old Marantz PM-68 class AB amplifier and I will refer to components using their ID that can be found in the service manual . When a friend gave me this amp, it was partially…
MFlop
  • 505
  • 3
  • 14
16
votes
1 answer

What is the functional difference between an in-circuit-debugger and an in-circuit emulator?

In-circuit emulators (abbreviated ICE) boast about their awesome debugging features, and also boast high price tags. In-circuit debuggers (abbreviated ICD) can do most of the stuff that an ICE can do, but often cost much less. I know that way back…
Kevin Vermeer
  • 20,283
  • 10
  • 61
  • 104
15
votes
3 answers

Why did my DC/DC Buck Circuit fail?

I'm in the process of debugging a PCB I made. On this board, a 24V input feeds through a DC/DC buck circuit (based around the TI TPS54202DDC) to output 11V, then an LDO to output 9V (to ensure a very stable 9V, I didn't want to convert directly to…
14
votes
9 answers

What's a good way to assert in embedded microcontroller code?

It's good practice to use assert to test that things are that we expect them to be. Likewise, it's good to check that calls worked as expected and didn't error. In a (simple) embedded system, if either of these fail, we probably just want to reset.…
SRobertJames
  • 1,429
  • 11
  • 28
14
votes
7 answers

Debugging a multilayer PCB?

This is not about debugging the actual hardware/software on the board... I had my first 6-layer PCB made recently, it's a 50mmx50mm board with the following stackup: Signal Ground Signal Signal Power Signal The actual signal types are irrelevant to…
Ron Beyer
  • 2,616
  • 1
  • 13
  • 23
1
2 3
…
35 36