Hi,
I'm using NRF52840 sdk v15 with Softdevice.
I have multiple SPIM instances and I make sure they are never active at the same time.
Can I share the pins (except the CS one) between the instances?
Thanks,
Daniel
Hi,
I'm using NRF52840 sdk v15 with Softdevice.
I have multiple SPIM instances and I make sure they are never active at the same time.
Can I share the pins (except the CS one) between the instances?
Thanks,
Daniel
Why would you want to do this? SPI supports multiple peripherals on the same bus.
If the answer is yes, this might efficiently emulate daisy chaining.
"If the answer is yes, this might efficiently emulate daisy chaining."
I'm not quite following what you are trying to achieve. You do not need multiple SPIM instances sharing the same IOs, one SPIM instance is enough. It's a bus after all. The answer is yes, you can, but I do not understand why you would want to.
You should rather check out the SPI transaction manager documentation and SPI transaction manager API, as well as the SPI Transaction Manager Example.
I'm comfortable with the SPIM driver interface and I would like to keep using it (rather than manipulate registers directly). Since there is no interface to daisy chaining there I figured out I can keep simpler wiring while minimizing power consumption. Does this make sense to you?
Thanks,
Daniel
What do you mean by daisy chaining? All slaves already share the IO lines with the exception of the CS line...
If you want to change the CS pin you can call nrf_spim_csn_configure, or use the SPI transaction manager.