Questions tagged [debugging]

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

Filter by
Sorted by
Tagged with
49
votes
4answers
73k views

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 ...
30
votes
6answers
5k views

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 ...
28
votes
3answers
2k views

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 ...
26
votes
5answers
33k views

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 ...
25
votes
2answers
5k views

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? ...
24
votes
8answers
5k views

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 ...
23
votes
3answers
10k views

Jtag debugging AVR

Can anyone advise what hardware and software is required for debugging AVR in circuit.
18
votes
8answers
26k views

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 ...
17
votes
1answer
16k views

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'...
17
votes
2answers
649 views

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. ...
14
votes
1answer
10k views

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 ...
13
votes
7answers
2k views

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 ...
11
votes
3answers
14k views

How to discover memory overflow errors in the Arduino C code?

Several times I had some suspicious outputs on the Serial Monitor after uploading code to the Arduino: like eternal output of whitespaces or suddenly cut of strings or scrambled strings. Because ...
11
votes
3answers
14k views

How do I debug a Arduino Uno with gdb on a Linux pc?

How do I debug (source code single step) a Arduino Uno with gdb on a Linux pc? Please note that I do not like to use AVR Studio in wine or VirtualBox. Question 1: Physical connection How and what do ...
10
votes
8answers
34k views

How do I debug an Arduino sketch?

I started coding for Arduino very recently. And these bugs in the code are killing me. As there is no hardware debugger in the Arduino, serial.print() is my only resort. What are the methods/practices ...
10
votes
2answers
4k views

What's the difference between a commercial JTAG debugger and an open source FT2232H OpenOCD debugger?

I have seen a few commercial JTAG debuggers such as: iC6000 On-chip Analyzer (with Aurora protocol support) Lauterbach – Microprocessor Development Tools And OpenOCD FT2232H-based JTAG debuggers: ...
9
votes
2answers
2k views

Good tools or methods for understanding structure of bootloader?

I recently figured out the cause of a nasty bug I've been working on with an Atmel AT91SAM9G20 SBC running U-boot, an open source bootloader. The core of the problem was that U-boot expected the ...
8
votes
2answers
3k views

AVR debugwire in Linux

So, I have hooked up a ATtiny88, and am programming it with the Dragon AVR using ISP. I have also set up the build toolchain, using avrdude, and the gnu avr tools. Everything is working great. Now I ...
7
votes
2answers
3k views

STM32L MCU - SWD pin on board not matching processor pinout

I was doing my hardware hack project on an air quality monitoring device which uses STM32L476 processor. My only experiences with hardware hacking are IPcams or ...
7
votes
3answers
1k views

(Updated) Strange reset behavior with ARM9 processor

I'm working on debugging a boot problem with an Atmel AT91SAM9G20 board. Everything goes great for the first 700 ms or so. It seems that about 700 ms after reset, the processor freezes. What's curious ...
7
votes
3answers
215 views

How do I find energy leaks?

I'm in a process of writing software for eZ 430 Chronos watch using TinyOS. I want it to be as low-power as it is possible. Unfortunately, my measurements show power consumption of about 350uA @3.3V ...
6
votes
4answers
2k views

Determining if mystery PCB with barrel jack power connector is center positive or center negative

I lost the power adapter to the module used to drive a LIDAR sensor I have. I am planning to make a new adapter but one problem I am running into is that I can't figure out if the module's PCB sources ...
6
votes
3answers
650 views

How can a SerDes based link be used to replace the age old UART? [closed]

UART is great to transmit log data from a DUT to a PC. However, it is not fast enough. There are many newer things like USB, PCIe e.t.c that can transfer a lot more data and also use serial transfer. ...
6
votes
5answers
2k views

Embedded Applications Software Testing Life Cycle

I have no JTAG and I can not afford it for my ARM Cortex M3 Chip. I'm wondering, how professionals debug their applications ? Do you flash your uC every time, frequently, then you run and test, ...
6
votes
2answers
2k views

MPU6050 accel/gyro noise that behaves strangely - what might be doing this?

I'm experimenting with an MPU6050 six-axis accelerometer/gyro reading data with a Raspberry Pi via I2C. The six-axis response makes sense in general as I rotate it by hand, rotating moves the gravity ...
6
votes
1answer
8k views

What is the difference between JTAG and EJTAG?

I want to know what is the difference between JTAG and EJTAG? I know about JTAG as it's a hardware tool used to examine the memory and registers. Correct me if I'm wrong.
6
votes
2answers
4k views

Diagnosing SD card failures

I have an embedded device using an SD card. Occasionally I see SD cards fail, and I need to understand the failure mode. Are there tools, perhaps for specific manufacturers, that help me understand ...
6
votes
2answers
592 views

Detecting DMA overflow in arbitrary waveform generation

I'm generating a complex series of pulses on an STM32F103, essentially as described in the ST app note AN4776 General-purpose timer cookbook, section 5.3. As a quick summary, that means I'm using the ...
6
votes
1answer
1k views

Sending debug information from MSP430 to CCS Console

I am debugging some code written for the MSP430F2132, which has very little flash memory available for the program. In order to debug properly, I must send information out to a terminal so that it can ...
5
votes
6answers
3k views

Power indicator for circuits with voltages much higher than LED forward voltages (say 15-48V)

I have a circuit that has a 24V power rail and I put an LED and series resistor on it for power indication. Even at 10mA forward current, over 200mW of power is dissipated, over 90% of it in the ...
5
votes
2answers
2k views

MSP430 seems to reset intermittently

I'm using the MSP430F5515 variant. I can't figure out any structured reason for it, but the chip clearly resets itself occasionally - i'm logging data and i put a 'known' string that only prints at ...
5
votes
2answers
2k views

MOSFET not turning off

EDIT: I just came back from my local Conrad and replaced the MOSFET with a new one - everything works just fine. I really just had the bad luck of having three faulty ones lying around. Good that I ...
5
votes
3answers
746 views

Did I Kill My Chip?

I've got an ENC28J60 Ethernet Controller in a circuit I'm building. I was testing it out but when I got to the point of talking to it over SPI with my micro-controller I got utter silence back from ...
5
votes
2answers
1k views

How to debug STM32L433 Current leakage

I have a circuit board with STM32L433 that has around 320uA of baseline current draw in STOP 2 mode. Only LSE with a 32kHz crystal is active. The board has separate analog Vdda power which is ...
5
votes
2answers
7k views

In relation to a PIC, what is a debug header?

In a recent question on which PIC to use, one answer mentioned that a particular PIC had the feature that of debug hardware being built in, so that a special debug header was not needed. What is a ...
5
votes
1answer
2k views

STM32F3 Discovery + GNU ARM plugin + OpenOCD - cannot load the binary onto the board

I'm using the GNU ARM plugin for Eclipse with Open OCD as a debugger. This is on Windows 10 x64. The problem I'm facing is the following error when trying to debug or run the sample program: Error ...
5
votes
2answers
954 views

FPGA able to send data, but unable to receive data. (UART - RS232)

I have a DE0-nano FPGA board and I am trying to establish a serial connection with my PC. I am using the RS232 implementation from here: http://www.fpga4fun.com/SerialInterface.html I have tested ...
5
votes
2answers
2k views

What is an MCU program trace?

I have read in a few places about Atmel's support of program traces on their high-end debugger/MCUs. It seems to be that some of the AVR32 processors can be 'traced' by the AVROne! programmer/debugger....
5
votes
2answers
603 views

Debugging DDR bus issues

We have an SBC board, in the style of the Leopardboard or Beagleboard, that is misbehaving. It's based on the Leopardboard design (TI-DM368 CPU, DDR2 RAM, NAND Flash). Developing software on the ...
4
votes
2answers
2k views

How is debugging build implemented in VHDL?

I come from C background and am being introduced to VHDL. I read about the syntax and the concurrency/consecutiveness of actions. Now I am getting to wonder how are development-only features ...
4
votes
1answer
1k views

LTSpice Zener diode bug?

I'm trying to design a circuit using a zener diode but am having issues getting it to work right. This circuit works fine and show Vout = 6.198V. However, if I swap their positions - Here, Vout = ...
4
votes
3answers
193 views

What facilities/methods exist to debug and simulate programs for PIC microcontrollers

In the university, even though I did do some PIC programming and project, the project was quite simple. We could always put in a blinking LED as a sign of life into our program or have the code write ...
4
votes
1answer
5k views

Error when using debugging under Atollic TrueStudio / STM32

I'm using STM32F103C8T6 Atollic TrueStudio STLink2.1 Error I get when debugging: Debug configuration set in TrueStudio: What worked before was in SW4STM32/Eclipse, with the following settings. I ...
4
votes
2answers
378 views

Detachable “debug” portion of PCB?

I'm trying to add "optional" debugging test points to an existing, very dense 4 Layer PCB design (signal - GND - PWR - signal). I'd like to change the existing PCB as little as possible. My idea was ...
4
votes
1answer
5k views

How to daisy chain SWD Debug port

I have multiple mcu's that are configured to communicate with bus topology. I have 10 pins (4 of them is occupied by now) I need to debug (update firmware online, etc) all of these mcu's. I read this ...
4
votes
1answer
173 views

Compiler optimization prevents code from running

I was trying to upload a simple code to my board Tiva C EK-TM4C123GXL but it didn't work. I found out that when I turn the optimizer off, the code works fine. This is the code for blinking the on-...
4
votes
2answers
2k views

Debugging my bipolar stepper motor design

I'm trying to connect a NEMA 17 Bipolar Stepper Motor to an Arduino Uno using an L298N Stepper Motor Controller Module and control its speed using a 10K potentiometer. I haven't found any examples ...
4
votes
3answers
3k views

PIC12F1822 program counter jumping around during debug and release programming

I am having the most awful trouble getting things up and running with my PIC12F1822. I'm using MPLAB 8.86, an ICD3 and have the chip, in a DIP package set up in a breadboard on my desk. As far as I ...
4
votes
3answers
289 views

Good method to remove tenting on vias after assembly for debugging?

This is a question about modifying an assembled board to make it easier to debug. In a perfect world, I would have left the bottoms of these vias un-tented. Whoops. I have two BGA parts on a PCB, ...
4
votes
1answer
2k views

How can I debug my 555 timer circuit?

I'm trying to build an LED chaser circuit using a 555 timer and a 4017 counter. I've built the circuit successfully on a breadboard, but now that I tried to create a soldered version it just does not ...

1
2 3 4 5
8