TWI Sensor example in Segger Embedded Studio not working

FormerMember
FormerMember

Hi 

 The compiling of standard TWI sensor example is giving me an error with SES.

 Please find attached a snapshot of the issue.

 Need your help ASAP. Thanks

Chandra

Parents Reply Children
  • FormerMember
    0 FormerMember in reply to Jørgen Holmefjord

    Hi Jorgen 

    Thanks for the info. Yes, with a fresh copy it is working. 

     If I change sdk_config.h for one example, will it affect other examples also. In the previous case, I changed sdk_config.h for another example and this one got messed up without any changes on the current sdk.h. 

     Also, what is the difference between TWIM_ and TWI_. 

     One final question:

    1. For a standard BT example (like say BLE_APP_UART), if I want to add a TWI sensor, what is the procedure

    2. Macros required (say TWI_ENABLED 1 or so)

    3. Where to define them ? In Prj->Options->Preprocessor or sdk_config.h

     

    Thanks,and Regards

    Chandra

  • The sdk_config.h file is not shared between projects, only between different IDEs for one example/board. Drivers and libraries on the other hand, are shared between all examples in the SDK.

    TWI is a legacy peripheral, included mainly for backwards compatibility with nRF51 series. It is deprecated in the nRF52 series, and TWIM peripheral should be used. TWIM peripheral support EasyDMA, allowing you to transfer and receive data on TWI without CPU usage. The data is transferred directly to/from RAM.

    If the parameter say it is NRF_CONFIG macro, it should be placed in sdk_config.h. If the config is not already present in the sdk_config.h file of your project, I recommend copying the entire section related to that module from another example project's sdk_config.h file, e.g. the twi_sensor example.

  • FormerMember
    0 FormerMember in reply to Jørgen Holmefjord

    Hi Jorgen 

     Thank you for the above note. Yes, It is working now. 

     I have another issue. I am trying to integrate a C++ Matrix library (Eigen) with Segger Embedded Studio (SES) and I am having issues with the compiler. It seems the default gcc compiler does not recognize c++ commands. Can you help me with the settings ?

     Looking forward

    Thanks

    Chandra

  • Our SDK does not have support for C++. You will have to put the C++ code into a .cpp file or specify that the file should be threated as C++ file by compiler. You will not be able to combine C and C++ code in a C file, this can only be done in C++ file.

Related