Do SPI and SPI1 share resources?
Do SPI and SPI1 share any firmware or hardware resources? I may want to run peripherals on each of the busses potentially in different threads (and maybe different than the main thread).
nRF52840 Specs & Docs
My research on the nRF52840 indicate that the 4 SPI busses are generally independent from each other and shouldn’t share resources. Per the nRF52840 datasheet:
184.108.40.206 Shared resources
The SPI shares registers and other resources with other peripherals that have the same ID as the SPI.
Therefore, the user must disable all peripherals that have the same ID as the SPI before the SPI can be
configured and used.
Disabling a peripheral that has the same ID as the SPI will not reset any of the registers that are shared
with the SPI. It is therefore important to configure all relevant SPI registers explicitly to secure that it
See the Instantiation table in Instantiation on page 23 for details on peripherals and their IDs.
From the referenced table, all the peripheral IDs are different between the 4 SPI busses, and SPI and SPI1 only share IDs with TWI and TWI1, so from a hardware perspective as long as I’m not using those Two-Wire instances, there should be no shared hardware resources. So hardware seems good, but then there’s deviceOS.
A while back I had this thread where I had problems with the SPI bus hanging in multi-threaded operation due to SPI not being threadsafe. Supposedly this also affected gen 3, and according to @rickkas7 a fix was planned at that time. v1.5.0 lists bugfixes:
These seem to address the prior specific issue, but my question is, can I safely use SPI and SPI1 simultaneously in separate threads from v1.5.0 onwards?. The github issue didn’t talk about much beyond the Ethernet Featherwing.