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

#35: #error directive: "Wrong configuration." Enabling TWI

Hello,

I received the above error using NRF5 SDK 12.2. I have modified "nrf_drv_config.h" so that it reads #define TWI0_ENABLED 1. Also, I put #include "nrf_drv_config.h" at the top of all my files which use "nrf_drv_twi" where the error occurs.

I am not sure what to do now as the error still occurs.

Thank you,

Levi

Parents Reply
  • Thanks, and sorry I am still new with this. I added both #define TWI_ENABLED 1 and #define TWI0_ENABLED 1 to my main.c file. Also, I modified "sdk_config.h" to define both values as well. However, I am still receiving the error. Not sure what is going wrong.

    EDIT: I should probably note that I also have enabled TWI0_USE_EASY_DMA. Looking at "nrf_drv_twi.h",

    #if ((TWI0_ENABLED == 1 && TWI0_USE_EASY_DMA == 1) ||
    (TWI1_ENABLED == 1 && TWI1_USE_EASY_DMA == 1)) #define TWIM_IN_USE #endif

    Having both enabled should define TWIM_IN_USE and fix this error, but I'm not sure what's going wrong.

Children
No Data
Related