SAMD20 - Timer waking MCU from sleep when it shouldn't

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,


I've got a 1s timer running that I want to automatically stop when I go to standby mode. I want to leave the interrupt enabled but I don't want the micro to wake up every second. It seems that this should be possible because the timer modules have a bit named RUNINSTBDY which is meant to stop the timer when the processor enters standby mode. It seems that setting this bit has no effect. I've checked the register before entering standby and it's clearly not set so the timer should automatically stop in standby. I'm having a similar issue with an external interrupt pin. I've set Wake-Up Enable to 0, but pressing the pushbutton on my interrupt line wakes up the micro from standby.


Here is my test code in main():


printf("Timer CTRLA %04x \r\n",CONF_TC_MODULE->COUNT8.CTRLA.reg);



I'm getting the "Wake" message every second or whenever I press the pushbutton.