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

SPI

Hi 

I'm using SDK 15.2.0 with Nrf52

I used the example of SPI from the SDK 

..\..\nRF5_SDK_15.2.0_9412b96\examples\peripheral\spi

and I get this error 

..\..\..\main.c(153): error:  #20: identifier "NRF_DRV_SPI_INSTANCE_0" is undefined

I added the drivers and update the sdk_config and copied the defines and variables 

Please advice 

Parents
  • Hi

    It sounds like you have not enabled use of the SPI.

    Are you using the example project as is? I just loaded the SES project under SDK 15.2's PCA10040 ...\examples\peripheral\spi and it compiled without issue. Also I don't see a line 153 in main.

    Looking at the project, it appears that NRF_DRV_SPI_INSTANCE_0 is defined in nrf_drv_spi_h  if NRFX_SPIM0_ENABLED or NRFX_SP0_ENABLED (see line 121-127). Both of those defines are found in sdk_config.h

Reply
  • Hi

    It sounds like you have not enabled use of the SPI.

    Are you using the example project as is? I just loaded the SES project under SDK 15.2's PCA10040 ...\examples\peripheral\spi and it compiled without issue. Also I don't see a line 153 in main.

    Looking at the project, it appears that NRF_DRV_SPI_INSTANCE_0 is defined in nrf_drv_spi_h  if NRFX_SPIM0_ENABLED or NRFX_SP0_ENABLED (see line 121-127). Both of those defines are found in sdk_config.h

Children
No Data
Related