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

"twi + softdevice" not working !!! makefile build fails

hello,

my makefile use to work before i add the twi nrf_drv_twi.c file and included the directory INC_PATHS += -I$(abspath ../../../../../../components/drivers_nrf/nrf_soc_nosd)

i get the error below when building at app_util_platform.c:

 app_util_platform.c: In function 'app_util_critical_region_enter':
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c:36:3: error: implicit declaration of function 'sd_nvic_critical_region_enter' [-Werror=implicit-function-declaration]
   (void)sd_nvic_critical_region_enter(p_nested);
   ^
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c: In function 'app_util_critical_region_exit':
/Users/brookgebremedhin/nordicSDK11/components/libraries/util/app_util_platform.c:49:3: error: implicit declaration of function 'sd_nvic_critical_region_exit' [-Werror=implicit-function-declaration]

if i tell the makefile that i am not using the soft device then it can build. cam anyone show me a working makefile that uses twi and soft device together ?

my makefile is attached below

thanks

Makefile

Parents
  • Do not add the directory ../../../../../../components/drivers_nrf/nrf_soc_nosd to your include path if you are using the SoftDevice. That directory is only for projects that don't use the SoftDevice.

    Instead, add the directory ../../../../../../components/softdevice/s130/headers to your include path.

  • The project needs to have the file nrf_drv_config.h added, and then edited to enable the TWI interface. Either set TWI0_ENABLED to 1 or TWI1_ENABLED to 1, depending on which of the two TWI peripherals you want to use. And set TWI0_USE_EASY_DMA or TWI1_USE_EASY_DMA to 0, since Easy DMA is only supported for nRF52.

Reply
  • The project needs to have the file nrf_drv_config.h added, and then edited to enable the TWI interface. Either set TWI0_ENABLED to 1 or TWI1_ENABLED to 1, depending on which of the two TWI peripherals you want to use. And set TWI0_USE_EASY_DMA or TWI1_USE_EASY_DMA to 0, since Easy DMA is only supported for nRF52.

Children
No Data
Related