After several days of investigation (despite having been into computers for more than 50 years), I’ve dug out some insights regarding ISRs on the Redboard Artemis. I’ve written up about 3 pages and would like to share it in hopes of saving others from having to do the digging I did, but I’m not sure where to put it. (I’m willing to “translate” it from OpenOffice to something else if necessary.)
Also, I have made some minor changes to the LowPower_WithWake sketch – in my [not so] humble opinion, it wasn’t a good example of how to write an ISR, so I rearranged it so it’s a better example of that. (I realize that [probably] Nate’s intention with this sketch was to measure low current, not be an example of “good programming practice”.) I would really like to share my version of it.
Thanks for the willingness to share! SparkFun might be able to find a place to host it - perhaps in a blog post? Can you attach a zip file to this post? (Maybe not given this forum’s settings… if that’s the case then DM me and I can try to get it posted publicly)
Sorry for the delay – life’s been a bit chaotic for me. (Hopefully this will work – my first time trying to do an attachment on this board!)
BTW, as an old compiler guy, it dawned on me a couple of days ago that there might be a way of getting the interrupt handlers into the standard Arduino attachInterrupt()/detachInterrupt() but I need to do some more research into that (and track down the source code for the existing attachInterrupt()/detachInterrupt() functions).
Hello, I just joined the forum. I too am interested in interrupts, specifically timer interrupts. I have built a number of Arduino sensor monitors using code I have written for a clock and calendar using interrupt functions. It’s cheaper and easier than using an RTC. The Arduino crystal oscillator is not the most accurate but with some tweaking, I’ve gotten my clock accurate to within a few minutes each year, which is ok for my purposes. I am exploring the Artemis Nano for its onboard memory and potential for bluetooth and while researching interrupts, came across keil.com which provides CMSIS-Core support for Cortex-M processor-based devices, which I believe includes the Ambiq Apollo 3. I will begin experimenting with the SysTick timer function this week but I am way out of my element when it comes to hardware and interrupts and the learning curve will be steep. Any thoughts or suggestions for getting up to speed on Artemis timer interrupts would be much appreciated.
OK, let’s try again to attach the zip file of the posting. (Please remember that my discussion is NOT for the raw beginner!)
One additional thing I thought of to try to get the attachment posted…