Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62408

Forum Post: RE: Debounce program using RTC timer

$
0
0
It sounds like you should clear the P2IFG bit just before you (re-)enable the P2IE: RTCCTL &= ~RTCIE; //RTC timer interrupt disable P2IFG &= ~BIT6; // Clear possible stale P2.6 status <--- P2IE |= BIT6; // P2.6 interrupt enabled This is actually not a bad general practice, e.g. at startup -- just before you enable any interrupt, clear any stale status. (Full disclosure: There are a few cases where you don't want to do this, but they're rare.)

Viewing all articles
Browse latest Browse all 62408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>