Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Toggling between SPI slaves with nrf_spi_mngr_perform (as opposed to nrf_spi_mngr_schedule)

We've got two SPI slaves that we need to talk to with the 52840 (PCA10056 dev kit for now) using SPI Manager.  In the initialization of these devices, I'd like to use nrf_spi_mngr_perform to set all the initial registers values, read them back, and verify them.  Works great for one SPI slave, but I can't figure out how to manage the CS for both devices (with nrf_spi_mngr_perform).

I understand how to use the pre and post callbacks to manage GPIO's to do the CS via nrf_spi_mngr_schedule, but I believe this is only possible with nrf_spi_mngr_schedule (by setting 

NRF_SPI_PIN_NOT_CONNECTED in the nrf_drv_spi_config_t structure).

Is this possible with nrf_spi_mngr_perform? We prefer to use nrf_spi_mngr_perform for immediate validation of
the setup, and simpler code during initialization. We will use nrf_spi_mngr_schedule
for the data updates, so we'll use the callbacks to manage the GPIO/CS pins.

Closest I found was this link, is this a valid supported solution?:

https://devzone.nordicsemi.com/f/nordic-q-a/5478/spi-with-multiple-chip-selects

Any way to set a callback after nrf_spi_mngr_perform?

What is the recommended SPI Manager sequence for multiple SPI slaves? Use nrf_spi_mngr_schedule even for code that does not need to be scheduled?

We're running SDK 15.0.

Thanks
Ed

Parents Reply Children
No Data
Related