This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

undefined SPIS macros...despite being defined?

Hello

I have recently downloaded SDK v10 for nRF51822 development using Keil uVision 5.14 IDE.

I am wishing to combine SPI slave function with custom BLE services/characteristics using S110 V8. As such, I’ve experimented with the SPI slave example and have a working version of button/led example from AN36.

I have attempted to combine them by moving the spi_slave_example.x files over to my an36 application. I’ve included relevant drivers from the “Manage Run-Time Environment” menu (nrf_drv_spis, specifically) and have my include path set to include local files.

On build I get the following errors (see attached build log.txt). Essentially it is complaining that some macros are undefined, but these are located in nrf_drv_spis.h which is included in the project. I can even link to these defines in uVision via right click > “Go To Definition Of..” so maybe something is partially working?

The only changes to main.c code was to include the spi slave example header, and initialize the example.

What could I be doing wrong?

build log.txt

Parents
  • When you use nrf_drv_xxx components you should modify header file "nrf_drv_config.h". Open it and find definition SPI0_ENABLED and modify it to 1.

    #define SPI0_ENABLED 1
    

    And you can assign SPI pins to your taste.

    #define SPI0_CONFIG_SCK_PIN         2
    #define SPI0_CONFIG_MOSI_PIN        3
    #define SPI0_CONFIG_MISO_PIN        4
    
  • FYI I have tried this with a fresh new template project from SDK 10 to try and isolate anything I may have done with my template modified for AN36. Essentially I repeated exactly what I did in my initial post (add nrf_drv_spis, including files etc.). Once again the same build errors show, so I can be sure that so far it is not to do with my meddling as far as getting the template to do what I want for AN36.

Reply
  • FYI I have tried this with a fresh new template project from SDK 10 to try and isolate anything I may have done with my template modified for AN36. Essentially I repeated exactly what I did in my initial post (add nrf_drv_spis, including files etc.). Once again the same build errors show, so I can be sure that so far it is not to do with my meddling as far as getting the template to do what I want for AN36.

Children
No Data
Related