0
\$\begingroup\$

SAMD21J18 in a custom made circuit behaves abnormally as following:

  • Delayed boot time between 2 to 5 seconds randomly
  • Boots on touching the MCU crystal's metal top with a metal pin
  • Boots on touching (not pressed) an onboard ESP32 MCU RESET button's plastic bud with a metal pin

Initially chip was not detected by Atmel Studio & Arduino IDEs. After resoldering it behaves as such during boot. Otherwise its works well. Crystal load capacitors were tried from 6pF to 15pF. The specified 12.5pF load caps for the crystal is onboard now.

Never came across such an error before. Anyone can shed some insight on this?

Edited after @voltage spike's reply: The same mcu when replaced in a different custom board boots normally. The metal pin used to touch the body of crystal was a thin screwdriver held at the plastic handle.

Crystal https://www.mouser.in/datasheet/2/741/LFXTAL009678Reel-940279.pdf

Schematic

\$\endgroup\$
  • \$\begingroup\$ The crystal is not used during boot, but only if and when your code enables it, and still probably only used for timekeeping not running. Does any of your code run? Start there, and look for manufacturing flaws like soldering issues. Have you tried explicitly driving the reset? Do you have anything like a serial adapter connected before the chip is powered? Injection currents can prevent proper power-on reset behavior. \$\endgroup\$ – Chris Stratton Oct 8 '19 at 16:07
  • \$\begingroup\$ @Chris Stratton : Yes, code runs. Soldering issues (if any) was rectified. Chip was programmed through SWD port using ATMEL ICE. No other Serial adapter used. RESET tried manually, works sometimes. \$\endgroup\$ – John Oct 8 '19 at 16:15
  • \$\begingroup\$ If code runs, then what exactly do you mean by "boot"??? At what point in code execution does it get stuck? Have you verified your alleged ground and power connections electrically are? What does VDDcore measure? \$\endgroup\$ – Chris Stratton Oct 8 '19 at 16:34
  • \$\begingroup\$ @Chris Stratton: VDDCore: 3.3v. \$\endgroup\$ – John Oct 9 '19 at 0:59
  • \$\begingroup\$ "VDDCore: 3.3v." that is decidedly unfortunate and probably means your chip is damaged or at best you are missing the cap that is supposed to be there: "VDDCORE: Internal regulated voltage output. Powers the core, memories, peripherals, FDPLL96M, and DFLL48M. Voltage is 1.2V." \$\endgroup\$ – Chris Stratton Oct 9 '19 at 4:04
0
\$\begingroup\$

The booting is probably an independent issue from the wake problem. To troubleshoot the booting problem, a debugger for the booting code would be best.

Somehow your triggering the wakeup circuit on the MCU. There are two ways this could happen, one is with ESD, the other is the internal circuitry of the MCU has been damaged by ESD and the transistors are easily triggered.

If your not wearing an ESD strap, you probably should. It's not surprising that touching the case of the oscillator triggers transistors on the MCU, your sending thousands of volts through the case of the oscillator (or wherever the pin is touching), and a small amount of current. This current flows indeterminately through PCB, and could cause transistors to trigger on the MCU.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ @ voltage spike: The same mcu when replaced in a different custom board boots normally. It was missed to be mentioned that the metal pin was a thin screwdriver with plastic handle. The metal part was not touched by hand. As you mentioned ESD strap is not used. \$\endgroup\$ – John Oct 8 '19 at 16:05

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.