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

Merge Twis i2c slave example in ble_template project

Hello everyone,

I am trying to add twis i2c slave in ble_template project. I found twi_master_twis_slave example in the sdk. I merge the project but ended up with following error

‘NRFX_TWIS1_INST_IDX’ undeclared here (not in a function); did you mean ‘NRFX_TWIS_INSTANCE’?

i have enabled the NRFX_TWIS in sdk_config.h file but still getting the error. 

Can anyone help me to solve this issue. Please provide me merging guide for twis slave and ble_template project. it would be really helpful.

Currently i am using

sdk version: - 16.0.0

DK: - nrf52832

segger embedded studio

Thanks & Regards

Pradeep

Parents
  • So i am able to resolve previous error as per your suggestion. But ended up with following error. I can see that in project-->options-->code --> preprocessor-->user include directories ,  all the file path are include but still getting following error.

    Linking GlucoTrac_BLE.elf
    Output/GlucoTrac_BLE Debug/Obj/i2c_slave.o: in function `twis_event_handler':
    undefined reference to `nrfx_twis_tx_prepare'
    /home/pradeep/nrf/BLE_project/GlucoTrac_BLE/i2c_slave.c:170: undefined reference to `nrfx_twis_rx_prepare'
    Output/GlucoTrac_BLE Debug/Obj/i2c_slave.o: in function `i2c_slave_init':
    undefined reference to `nrfx_twis_init'
    /home/pradeep/nrf/BLE_project/GlucoTrac_BLE/i2c_slave.c:219: undefined reference to `nrfx_twis_enable'

Reply
  • So i am able to resolve previous error as per your suggestion. But ended up with following error. I can see that in project-->options-->code --> preprocessor-->user include directories ,  all the file path are include but still getting following error.

    Linking GlucoTrac_BLE.elf
    Output/GlucoTrac_BLE Debug/Obj/i2c_slave.o: in function `twis_event_handler':
    undefined reference to `nrfx_twis_tx_prepare'
    /home/pradeep/nrf/BLE_project/GlucoTrac_BLE/i2c_slave.c:170: undefined reference to `nrfx_twis_rx_prepare'
    Output/GlucoTrac_BLE Debug/Obj/i2c_slave.o: in function `i2c_slave_init':
    undefined reference to `nrfx_twis_init'
    /home/pradeep/nrf/BLE_project/GlucoTrac_BLE/i2c_slave.c:219: undefined reference to `nrfx_twis_enable'

Children
Related