That’s great, thanks. Any ability to adjust the interrupt priority with the existing library?
Perhaps the docs site could be slightly changed to allow drop-down sub-sections for each of the section headers, rather than having to continuously scroll down a single page.
Oh right interrupt priority, missed that bit in the original post.
Doesn’t look like there’s any function to do that in the Spark library, here’s the relevant code from spark_wiring_interrupts.cpp, it looks like the interrupt priority is hardcoded based on the pin number:
The NVIC functions are all part of the chip’s standard peripheral driver library, which I’ve always found somewhat confusing to use, but you may be able to re-initialize the priority levels using the NVIC functionality yourself after calling Spark’s attachInterrupt().
This site has some auto-generated documentation based on the NVIC functions’ source files, hopefully it will at least get you started.
Edit: the site linked above shows the documentation for the STM32 F4 series chips, whereas the SparkCore uses F1 series, so you may want to poke around a bit more to see if you can find documentation for the F1. But I doubt it will be significantly different, if at all.
Not sure what you are trying to do, but Interrupt Priorities 0, 1, 2 are used for the dma channels servicing the CC3000, the interrupt from the CC3000, and the UART respectively, and all are very sensitive to interrupt service times. I’d recommend not going anywhere near these with priority changes.