2

I'm using a ATSAM4S device and I've encountered some problems. I've assembled two boards that are very similar(same pinout, same devices, just a change in LED GPIOs and MCU position on board). First one works very well, second one created me problems from start, like wrong ID, security bit set when it wasn't ecc. I've not used it for a while but now I need to use this board. Programming now working well(don't ask me how, I've switched to JTAG from SWD and this solved all problems also for switching back to SWD) but now, if I load the same code that is on the first, well working, board to this MCU, it goes random to HardFault in debug mode. Also when running simply code as LED blink, MCU resets at random after some seconds. Main cause of this problems is related to faulty MCU or PCB board(as after a lot of test I can't say that is a code error). So, since it's more probably that it's a PCB error, what can be the main problems that cause a MCU to reset randoms after some seconds?

p.s. I've tried same code on either MCU, changed to more stable power supply, tried simply codes, still have problems on this MCU.

Singe
  • 617
  • 2
  • 9
  • 20

1 Answers1

1

1-It might be missing decoupling capacitors or their layout (far from uC) or their values. check out hardware design consideration ATmega

2- make sure the reset pin is pulled up correctly. Recommended reset connection

3- check out BOR , POR and Watchdog settings.

ElectronS
  • 3,159
  • 1
  • 22
  • 47