My exact mistake is summed up like this: IEN0 is not IEN1, turning off the fifth bit on IEN0 will disable the sleep timer, whereas, turning the fifth bit off on IEN2 will disable the interrupt. Don’t turn off the sleep timer on a low energy device when you want to disable the interrupt.
Finding this was quite a pain and because of that pain I feel it will stick with me for a very long time time. On a positive note, I am glad I took the time to learn how to use an oscilloscope to measure current draw otherwise this wouldn’t have been detected.
Thanks to Mark Vandervoord @ ThingamaByte for his help with hunting this down and showing me a handful of debugging tricks along the way.
blog comments powered by Disqus