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

nRF52832 error directive wrong configuration when removing SPI

I'm using nRF52+SDK11.0.0+S132. It currently has SPI, SPIS, TWIM, RTC. I want to remove SPI and I'm getting: ..\components\drivers_nrf\spi_master\nrf_drv_spi.c(56): error:  #35: #error directive: "Wrong configuration." when I modify nrf_drv_config.h (attached) to set SPI0_ENABLED = 0. Please advise.

nrf_drv_config.h

Parents
  • Hi,

    If you have a look at the error on line #35 in nrf_drv_spi.c, you can see that this will only trigger if SPI and SPIM are not in use. Maybe it will help to remove nrf_drv_spi.c from your project?

  • To make my project work, I have the file nrf_drv_spi.c included in the build and I call nrf_drv_spi_init() with dummy pins (0) for the SPI peripheral. If I comment out nrf_drv_spi_init() but leave nrf_drv_spi.c with #define SPI0_ENABLED 1, my project builds but does not run properly. Similarly, if I remove nrf_drv_spi.c (per your suggestion) with #define SPI0_ENABLED 0, my project builds (I don't get the "Wrong configuration" error this time) but still does not run properly. Please advise.

Reply
  • To make my project work, I have the file nrf_drv_spi.c included in the build and I call nrf_drv_spi_init() with dummy pins (0) for the SPI peripheral. If I comment out nrf_drv_spi_init() but leave nrf_drv_spi.c with #define SPI0_ENABLED 1, my project builds but does not run properly. Similarly, if I remove nrf_drv_spi.c (per your suggestion) with #define SPI0_ENABLED 0, my project builds (I don't get the "Wrong configuration" error this time) but still does not run properly. Please advise.

Children
No Data
Related