This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Managing multiple SPI and TWI peripherals

Hello,

I'm working on an application where we have a number of sensors and a radio that each require a connection to the nRF52. Specifically, 4 of these peripherals need a SPI connection to the nRF52 and one needs an I2C connection. We can put two of the peripherals on the same SPI bus with very little issue, since the two peripherals operate at strictly different times. The other 2 SPI peripherals need to be checked at approximately 1 kHz and 100 Hz, respectively (we need to read data out of a buffer before it gets overwritten). The I2C peripheral only needs to be referenced at a rate of < 1 Hz.

I understand that the nRF52 cannot use SPI0 and TWI0 at the same time. My main question is this: is it feasible (and if it is, how quickly can the nRF52 accomplish this) to switch between using SPI0 and TWI0 (i.e. de-initialize one peripheral and re-initialize another) so that we could place the two peripherals on separate SPI buses? Or would it be better to figure out how to time multiplex the two peripherals on the same SPI bus?

Related