Hi,
I'm working on a project where the NRF52840 chip is connected to multiple peripherals (4 of them) through SPI. The hardware has been designed in a way that each peripheral has its separate SPI pins (separate clock and data pins). I'm trying to define an SPI instance for each device, however, I'm facing the following issues with that approach:
1- I used SPI instance 0 with no issues. I used instance 1 for another device and I got this compilation error:
error: #20: identifier "NRF_DRV_SPI_INSTANCE_1" is undefined
I tried to enable multiple things in the sdk_config.h but none of them worked. Please let me know how to enable Instances1,2,3 properly.
2- I tried to reuse the same instance for 2 peripherals but I got this runtime error:
NRF_ERROR_INVALID_STATE which occurred when calling "nrfx_spi_init" inside "nrf_drv_spi_init"
3- Is there a better approach you can recommend to talk to 4 devices at the through different SPI?
Regards