[riot-notifications] [RIOT-OS/RIOT] Timer gets disabled after interrupt (#11526)

Alexander notifications at github.com
Tue May 14 21:32:22 CEST 2019


#### Description
Periodic timer interrupt for cyclic time sensitive tasks. I am not sure, if this is a bug, or intentional feature, but on timer interrupt the bellow line would disable any future interrupts:
`//TIMER_0_DEV.INTENCLR.reg = TC_INTENCLR_MC0;`

As part of RIOT > cpu > samd21 > periph > timer.c, function void TIMER_0_ISR(void):
   ```
    /* Timer 0, channel 0 */
    /* Interrupt pending and interrupt enabled */
    if (TIMER_0_DEV.INTFLAG.bit.MC0 && TIMER_0_DEV.INTENSET.bit.MC0) {
    	/* Clear interrupt pending flag (should be auromatic, when reading */
        TIMER_0_DEV.INTFLAG.reg = TC_INTFLAG_MC0;
    	/* Disable Match or Capture interrupt */
        //TIMER_0_DEV.INTENCLR.reg = TC_INTENCLR_MC0;
    	/* Call callback */
        if(config[TIMER_0].cb) {
            config[TIMER_0].cb(config[TIMER_0].arg, 0);
        }
    }
```

<!-- Please describe your use case, why you need this feature and why this
feature is important for RIOT. -->

### Useful links
<!-- Please include links to any documentation that you think is useful. -->

<!-- Thanks for contributing! -->


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11526
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190514/049d2880/attachment.html>


More information about the notifications mailing list