PaulStoffregen
Well-known member
More libraries are starting to use SPI from interrupts, which causes a conflict with non-interrupt SPI usage, or SPI-based libraries like Ethernet & SD.
I'm considering publishing SPI usage guidelines for Teensy 3.x. This thread is the place to comment on the technical details.
This system will be voluntary. It will only prevent conflicts if every library & program using SPI follows the guidelines. I'll patch SD and Ethernet and eventually others that come with the Teensyduino installer. A huge challenge involves persuading authors of SPI-using libraries to follow these guidelines.
My thought so far is to declare interrupt priority level 192 to be the threshold for SPI usage. ARM interrupt priorities range from 0 to 256 (or to -2 if you count a couple extra priority system things), where 0 is the highest priority and 256 is non-interrupt priority. The Teensyduino core library assigns priority 128 as a default to most interrupts.
As this idea develops into a guideline, I'll update/edit this message.
If anyone has any comments or suggestions, now's the time to speak up!!
I'm considering publishing SPI usage guidelines for Teensy 3.x. This thread is the place to comment on the technical details.
This system will be voluntary. It will only prevent conflicts if every library & program using SPI follows the guidelines. I'll patch SD and Ethernet and eventually others that come with the Teensyduino installer. A huge challenge involves persuading authors of SPI-using libraries to follow these guidelines.
My thought so far is to declare interrupt priority level 192 to be the threshold for SPI usage. ARM interrupt priorities range from 0 to 256 (or to -2 if you count a couple extra priority system things), where 0 is the highest priority and 256 is non-interrupt priority. The Teensyduino core library assigns priority 128 as a default to most interrupts.
As this idea develops into a guideline, I'll update/edit this message.
If anyone has any comments or suggestions, now's the time to speak up!!