Hi,
I have the same issue as in here: https://devzone.nordicsemi.com/f/nordic-q-a/62676/2-spi-devices-nordic-nrf52382
but for me the Debug/Release-toggle does not work.
I use SDK 15.3 and Softdevice s132 with a BC832. I try to connect (in the end 3 but for now) 2 SPI devices to the BC832. Since they might send data simultaneously and I don't need the GPIO pins otherwise, I would prefer having an interface for each of them and other threads mention that it is possible.
Segger Embedded Studio (V4.52) gives this error:
‘NRF_DRV_SPI_INSTANCE_1’ undeclared here (not in a function); did you mean ‘NRF_DRV_SPI_INSTANCE_0’?
in nrf_drv_spi.h in line 120 (which reads: "#define NRF_DRV_SPI_INSTANCE_(id) NRF_DRV_SPI_INSTANCE_ ## id")
whenever I add the second SPI instance. (I have not tried the third yet.)
code used:
#define SPI_INSTANCE_0 0 static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE_0); /**< SPI instance. */ #define SPI_INSTANCE_1 1 static const nrf_drv_spi_t spi1 = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE_1); /**< SPI instance. */
SPI0_ENABLED, SPI1_ENABLED and SPI2_ENABLED are all set to 1. see config file: sdk_config.h
what am I doing wrong? Appreciate any suggestions/help.
(btw, if I only use SPI_INSTANCE_0 and set it to 1 or 2 and comment out the last two lines of the code above, it of cause gives the same error!)