Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

"NRFX_SPI0_INST_IDX" is undefined (IAR)

Hi,

Can't get rid of compilation error about undefined NRFX_SPI0_INST_IDX after adding nrfx_spi driver. Searched the forums and found similar issues but none of the suggested actions seems to work for me. The steps taken to add the driver:

  1. nrfx_spi.c added to project
  2. #define NRFX_SPI_ENABLED 1 and #define NRFX_SPI0_ENABLED 1 in sdk_config.h
  3. Include file search paths updated as far as I can tell (no complaints about missing files)

Using a very similar configuration for TWI/TWI0 which I managed to get working. I had issues with this as well but managed to solve it by defining TWI_ENABLED 1 and TWI0_ENABLED 1 as well. The corresponding thing does not work with SPI though.

Using IAR compiler and SDK 15.0.0, nRF52832

BR

/Ola

Related