SAMD20 not recovering from deep sleep

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello. I have an ATSAMD20 which I enter sleep mode around every 1 second for some 900 milisec. The processor operates correctly for a couple of hours and then it suddenly stops waking up from the sleep mode (via any kind of interrupt).

I have searched everywhere on the internet for solution but I didn't find anything. The processor seems to randomly hung up and requires reboot in order to operate again.

 

I found also the following forums talking about the same problem but no solution is being given:

https://community.atmel.com/forum/samd20-problem-waking-systemsleep

https://www.avrfreaks.net/forum/samd21-samd21e16b-sporadically-locks-and-does-not-wake-standby-sleep-mode

 

I am using FreeRTOS to do my work and my sleep is on the IDLE hook:

void vApplicationIdleHook( void ) {
		if (!bIsInit)
			return;

		taskENTER_CRITICAL();
		
//		cpu_irq_disable();

/*		SYSCTRL->VREG.bit.FORCELDO = true;
		SYSCTRL->VREG.bit.RUNSTDBY = true;*/
		system_set_sleepmode(SYSTEM_SLEEPMODE_STANDBY);
		system_sleep();

//		cpu_irq_enable();
		taskEXIT_CRITICAL();
	}

This problem seems to be only for ATMEL related cpus and searching the internet no other cpu manufacturer seems to have that kind of problem with their Arm Cortex M0+ cpus.

 

Is anyone having a solution to my problem?

I would not in any case like to use a watchdog timer to reboot the cpu after lets say 4 seconds of inactivity. Since this is either hardware (or software) related problem, I would prefer first to solve that problem and only on real production environment enable the watchdog (just in any case to help me from other unpredictable problems). I am totally against to escape that kind of situation (using watchdog) than solving it as it is a bad practice a lot of engineers employ.

 

Thank you very much.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi @ekalyvio,

 

I want to refer you back to this thread:

https://community.atmel.com/forum/samd21-samd21e16b-sporadically-locks-and-does-not-wake-standby-sleep-mode

 

I have made some posts that may help.

 

Regards,

Pieter