0
\$\begingroup\$

I made a custom board with 2 ATSAMD10D13AM parts. The are 8k flash/4k sram Cortex-M0 24QFN parts. When I power the board the IC's start but then freeze (I have LED's blinking that go solid). When I attach the debugger and start debugging, it runs fine. The debugger senses power and does not supply it. The code is modified reference design code for the Xplained Mini, it uses the same part except 16k flash. I am pretty sure I changed the part everywhere. I think maybe the ramp isn't perfect. It is supposed to be 25us or greater from 0 to 2.5V. I will measure it with a scope. Otherwise what could it be?

\$\endgroup\$
  • \$\begingroup\$ (a) Is this a standard JTAG debugger you are attaching, to make things "work"? (b) What is the history of the design e.g. was there a previous working version (in which case, what changed since then) or is this the first actual hardware being tested? (c) Are both MCUs definitely "freezing"? (d) Is there any variation (no matter how small) in the time between power-on and freeze, when tested multiple times? (e) Can you supply the schematic? (f) Can you supply a photo of the component side of the populated PCB, showing the MCUs and the place where the debugger is attached (see question (a))? \$\endgroup\$ – SamGibson Nov 16 '16 at 1:17
  • \$\begingroup\$ Is it possible that when you "start debugging" that the tool chain does some initialization of the target. And maybe this initialization is omitted from the startup code. \$\endgroup\$ – kkrambo Nov 16 '16 at 2:10
1
\$\begingroup\$

I had this same problem on an ATSAM4LS2A. Did you check that the watchdog is disabled from the fuses? This was my problem, i didn't have any wtd_reset in my code because i hadn't activated the wtd from the program, but it was on by default.

\$\endgroup\$
0
\$\begingroup\$

I haven't seen answers to my earlier questions yet, but as I'm about to go offline, I'll add my hypothesis (which might become more or less likely, depending on the answers to those questions), in case it helps.

I have seen symptoms similar to yours a few times, due to missing or insufficient power decoupling near the MCUs, or an unstable power supply. For either of those cases, the result is unstable power to the MCU(s) in a "normal" configuration (i.e. without a debugger attached). That could explain the "freezing".

JTAG debuggers will often contain a capacitor connected between the target power rail and ground pins. When the debugger is physically attached to the target system, even when the debugger is not actually in-use, it adds that "hidden" internal capacitor across the target system's power rail. Therefore in some cases, if the target is suffering from inadequate power decoupling, or needs extra capacitance due to an unstable power input, then "bingo!" the target system works - just by attaching the debugger :-)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.