53

On PIC and dsPIC chips, I have observed the following causes of unexpected reset. Hardware: Reset pin driven low or floating. Check the obvious stuff first! ESD coupling into the reset pin. I've seen this happen when completely unrelated equipment gets turned on on the same desk. Make sure there's enough capacitance on the reset pin, possibly as much as 1 ...


53

Electrically Pin Count JTAG requires 4 signal lines SWD only requires 2 signal lines 2-wire JTAG interface specified in IEEE 1149.7 drops the pin count but doesn't seem to be widely available on many ICs. It also reduces bandwidth. Topology JTAG uses a daisy chain configuration for its data lines between chips. JTAG's speed is thus limited by the slowest ...


46

This practice is generally known as 'Percussive Maintenance'. Any touching contacts, for instance in connectors, valves and their bases, and between the wiper of a potentiometer and the track, have a tendency to build an insulating film between the contacts. This happens most readily at higher temperatures, in high humidity, and when there is airborne ...


25

I can come up with a few disadvantages of using printf(). Keep in mind that "embedded system" can range from something with a few hundred bytes of program memory to a full-blown rack-mount QNX RTOS-driven system with gigabytes of RAM and terabytes of nonvolatile memory. It requires someplace to send the data. Maybe you already have a debug or programming ...


23

There are different bags available. Some of them are insulators (nearly, see below) and only prevent the build-up of static charge. Others are conducting (grey-metallic ones typically or black ones). I wouldn't place any powered electronics on conducting anti-static bags or mats. Even the fairly high resistance can have a big influence on the electronics (...


23

If you have a current-limited bench supply, set it to 2 or 3 amps, and connect it between power and ground on the bare board. (Better: start with 100 mA and ramp it up to 2 or 3 A if it doesn't cook off the short) Now probe with a reasonable voltmeter and see what part of the power net is closest to the ground potential. Your short is somewhere near there.


21

I would strongly suggest getting out of the habit of thinking of anti-static material as "safe" insulators. While that may be true enough for some materials at low voltages, all anti-static materials are conductors at higher voltages. That's what makes them anti-static. You don't know precisely what voltage below which they become safe to consider an ...


20

In addition to some other fine answers, the act of sending data to a port at serial baud rates can just be downright slow with respect to your loop time, and have an impact on the way the remainder of your program functions (as can ANY debug process). As other folks have been telling you, there's nothing "bad" about using this technique, but it does, like ...


19

It's worth noting that older TV's were constructed with point-to-point electronics soldered by hand, lacking a firm place for the components to be anchored to, such as this image showing the underside of the chassis of a 1948 Motorola VT-71 7" television. (image taken from the wikipedia page for Point-to-point construction) From the image alone it is clear ...


15

Thanks for the pointers, markt and chris-stratton. The semihosting option turned out to be quite straightforward. I managed to find the source for a couple of simple logging routines that can send messages to the OpenOCD console. I'll post them here since (i) they required some modification to work and (ii) I think this info is not super easy to find for ...


15

I suspect something to do with the strong magnet (I wouldn't have suspected it, except that it must be an interesting answer or you wouldn't have posed the question). Perhaps having the magnetic field induces a current in a loop somewhere. Was the leakage higher when there was more area between the wires connecting to the battery? Or it could be a current ...


15

Here is the summary of my investigations and my findings on the mysterious case of the random leakage current. When I began dismantling the units, I also got curious and wanted to research a rational cause for that odd behavior. I had no luck until I almost inadvertently moved the magnet near a powered-up PCB. The ammeter jumped to about 2mA and stabilized ...


14

Find a spot that is clear on all layers, such as a via that is not connected to power or ground; there should be an annular ring visible if you shine a light through the back of the board. (Not all the way around of course due to the connecting signal traces, but there should be some kind of broken donut segments visible.) There are manufacturing tolerances, ...


13

Study the circuit board and the components on it. Trace along the suspected positive and negative power tracks. Look for components that have identifiable positive and negative terminals. Electrolytic capacitors have their negative terminals clearly marked. If you can find data sheets for any integrated circuits on the PCB, see which are the power and ...


12

Old question, but none of the answers address the performance comparison. Although the feature set between SWD and JTAG (when using a CoreSight DAP) are near enough the same, SWD sequences are roughly 10% shorter than the equivalent JTAG sequences. There is no loss in data bandwidth in most cases (particularly streaming reads or writes where bandwidth is ...


11

Since the LM7372 is a high speed op-amp your first suspicion should be that they are oscillating at high frequency. Your U62A/B can be expected to oscillate since it is decompensated for high speed- the minimum gain to assure stability is +2 and you have +1. Bingo, it oscillates like a banshee. The LM7372 is stable for gains as low as +2 or −1. The ...


11

Use a multimeter. You will probably find that those pins are connected to the SWD pins. Note that PA14 clearly goes to a via, which will then run along the bottom side of the PCB. PA13 most likely runs underneath the micro, and into a via, and runs to the SWD header through the bottom layer too. Just because you look at something from the top and cannot ...


11

Use a different LED. High brightness LEDs should still be plenty bright enough for an indicator at 1-5 mA. The problem you have is whatever component(s) you use to do this linearly will be dissipating the excess energy as heat. The only way to perform this more efficiently if you wish to run from a high voltage, and put 20 mA thru the LED is to use some ...


11

Find a signal or shield ground on the module, and check with an ohmmeter to the connector. In all likelihood the power connector ‘sleeve’ is ground also, and will be zero ohms. The pin would be positive then. If it’s not, try the center pin to signal ground. If that is zero then the pin is GND and the sleeve is positive. You may now curse the designer ...


10

You are putting characters into the transmit buffer as fast as you can, without checking whether the UART is ready to accept a next character. Hence a lot of characters are lost, and what the PC receives is a more or less random subset of the characters you attempt to transmit. Check for the 'tx buffer empty' or 'tx fifo not full' bits. Before assigning a ...


9

The RESET-pin must be properly driven by a reset circuit monitoring over/under voltage and creating a long enough reset signal. With that in mind my experiences with an uncontrolled hardware reset comes then from: Crosstalk from switching lines into the RESET pin/line(make them short) Ground shifts/loop caused by switching on/off external high current load ...


9

This is more of a blog post, but here goes: If you write in C, you can compile your code and run it on your desktop. This won't test the low-level hardware drivers, but can test all the logic code. Recommendations on this approach: If you're on ARM, you can use the same compiler (gcc) for both purposes. Then any compiler-specific extensions will ...


9

Even though this a a 'simple' circuit there are still lots of things that can go wrong. Finding a fault is quite an art. Let's start by breaking the circuit into two parts. The BJT switch and the MOSFET switch. Design issues The first thing is to look at the design - what's wrong? (if anything). Not every circuit you find on the internet actually ...


9

Bad connections, corroded vacuum tube sockets making poor contact, cold solder joints and so on could sometimes be temporarily mitigated by the judicious application of 'percussive maintenance' techniques.


9

The reason you can't find a scope with enough channels is because you're looking for the wrong tool. Scopes are best for analog stuff, and ones with more than 4 full-featured channels are rare. Each channel on a scope has a relatively complicated, and thus expensive, high-bandwidth low-noise amplifier, so a scope with 50+ channels would be extremely ...


9

This is a late answer, expanding on The Photon’s answer. I realize that few people will see this now, but I can reference it when similar questions are asked in the future. Over my long career, I became known as the expert at finding shorts at the large company where I worked, so besides the shorts that I had on my own projects, other people would ask for ...


8

JTAG is more than examining memory and registers, see EEVBlog 499 - What is JTAG and Boundary Scan? [JTAG] was initially devised by electronic engineers for testing printed circuit boards using boundary scan ... [and] is also widely used for IC debug ports. In the embedded processor market, essentially all modern processors implement JTAG when they have ...


8

That is a disaster waiting to happen. Here are just a couple of the problems: You can't use galvanized steel bolts for your spark gap. They'll quickly overheat, erode, and the wooden base will probably catch fire. Also, the zinc plating will burn off in a cloud of toxic fumes. Try a Richard Quick gap or a sucker gap. You can't use microwave oven ...


8

This is primarily historical, and I'm sure one of the old timers that has been doing this longer than I've been alive will come in with a better answer. We take for granted the on board debug capabilities and flash ROM in modern microcontrollers, DSPs and ASICs. In the old days, the processor may have either been one time programmable (use once), or ...


8

SDA has different low levels depending on whether the master or slave is pulling it down. This is actually a useful debug tool because you can tell who is controlling the SDA at that moment. You will probably eventually wish to determine why they are pulling down to different grounds, though. The spikes are overshoot, caused by impedance mismatch.


Only top voted, non community-wiki answers of a minimum length are eligible