Hello, I am currently programming the SAM3x8E from an external PC using Atmel Studio. From unknown reasons, at every ~18 seconds, the microcontroller resets. The code(reduced to the minimum for test purposes) is this: Code: #define F_CPU 84000000L #include "sam.h" static void pinInit(){ // Set pin 11[D7] as output for test LED PIOD -> PIO_PER |= PIO_PD7; // PIO_PER = PIO enable register PIOD -> PIO_OER |= PIO_PD7; // PIO_OER = Output Enable Register PIOD -> PIO_PUDR |= PIO_PD7; // Enable pull-up on pin D7 } int main(void) { /* Initialize the SAM system */ SystemInit(); pinInit(); PIOD->PIO_SODR = PIO_PD7; while (1) { } } Does anybody have an idea about what is happening?
Perhaps this will help: http://arduino.stackexchange.com/qu...uomatically-after-about-18-seconds-on-its-own
I figured out that if I completely disable the watchdog it won't reset any more. Though this is not a normal behavior unless the watchdog is already set.