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

MPU6050 with NRF52832 in segger

Hi,

I am working on MPU-6050 sensor.

I have downloaded the NRF5-MPU-EXAMPLE  from this link

in that there is no SES file.

How to create a SES file to work this code in segger..

Parents Reply Children
  • I have used both forward slash and back slash  its doesn't change. error still occur

  • Did you place the example project in the correct level inside the SDK and the directory where the mpu files are located?

    You should have the mpu library files located in [SDK_ROOT]\examples\nrf5-mpu-examples\, and your SES project should be located in [SDK_ROOT]\examples\nrf5-mpu-examples\nrf5-ble-mpu-simple\pca10040\s132\ses

    From your original image, it looks like you have the project and library files located in a wrong path level.

  • Hi,

    I have used BLE UART SES file and i add the main.c, app_mpu.c,ble_mpu.c and i use

    The sdk_config.h file must be the BLE UART sdk file

    but in

    MPU_EXAMPLE\nrf5-ble-mpu-simple\pca10040\s132\config sdk_config.h

    which one we need to use?

  • HI,

    As you said i have created the SES folder in the example path:

    F:\nRF52 SDK files\nRF5_SDK_15.2.0_9412b96\nRF5_SDK_15.2.0_9412b96\examples\nrf5-mpu-examples\nrf5-ble-mpu-simple\pca10040\s132\SES

    and copy the BLE_UART SES file into that and changed the name into nrf5-ble-mpu-simple_pca10040_s132 for EMPROJECT file and EMSESSION file and changed in the <open solution> in editor.

    then I

    1. remove the main.c file

    2. added main.c file of nrf5-ble-mpu-simple_pca10040_s132, app_mpu.c,ble_mpu.c,nrf_drv_mpu_twi.c and nrf_drv_mpu_spi.c

    3.  in sdk_config.h file

    #ifndef NRFX_TWI_ENABLED
    #define NRFX_TWI_ENABLED 1
    #endif
    // <q> NRFX_TWI0_ENABLED  - Enable TWI0 instance
     
    
    #ifndef NRFX_TWI0_ENABLED
    #define NRFX_TWI0_ENABLED 1
    #endif
    
    #ifndef TWI_ENABLED
    #define TWI_ENABLED 1
    #endif
    
    // <e> TWI0_ENABLED - Enable TWI0 instance
    //==========================================================
    #ifndef TWI0_ENABLED
    #define TWI0_ENABLED 1
    #endif

    4. added User include directories and preprocessor definitions as

    while Build the project i got 6 errors

    Rebuilding ‘nrf5-ble-mpu-simple_pca10040_s132’ from solution ‘nrf5-ble-mpu-simple_pca10040_s132’ in configuration ‘Release’
      Assembling ‘thumb_crt0.s’
      Compiling ‘nrf_log_backend_rtt.c’
      Compiling ‘nrf_log_backend_serial.c’
      Compiling ‘nrf_log_default_backends.c’
      Compiling ‘nrf_log_frontend.c’
      Compiling ‘nrf_log_str_formatter.c’
      Compiling ‘app_error.c’
      Compiling ‘app_button.c’
      Compiling ‘app_error_handler_gcc.c’
      Compiling ‘app_fifo.c’
      Compiling ‘app_error_weak.c’
      Compiling ‘app_scheduler.c’
      Compiling ‘app_timer.c’
      Compiling ‘app_uart_fifo.c’
      Compiling ‘app_util_platform.c’
      Compiling ‘hardfault_implementation.c’
      Compiling ‘nrf_assert.c’
      Compiling ‘nrf_atfifo.c’
      Compiling ‘nrf_atflags.c’
      Compiling ‘nrf_atomic.c’
      Compiling ‘nrf_balloc.c’
      Compiling ‘nrf_fprintf.c’
      Compiling ‘nrf_fprintf_format.c’
      Compiling ‘nrf_memobj.c’
      Compiling ‘nrf_pwr_mgmt.c’
      Compiling ‘nrf_ringbuf.c’
      Compiling ‘nrf_section_iter.c’
      Compiling ‘nrf_strerror.c’
      Compiling ‘retarget.c’
      Assembling ‘ses_startup_nrf52.s’
      Assembling ‘ses_startup_nrf_common.s’
      Compiling ‘system_nrf52.c’
      Compiling ‘boards.c’
      Compiling ‘nrf_drv_clock.c’
      Compiling ‘nrfx_clock.c’
      Compiling ‘nrfx_gpiote.c’
      Compiling ‘nrfx_power_clock.c’
      Compiling ‘nrfx_prs.c’
      Compiling ‘nrfx_uart.c’
      Compiling ‘nrfx_uarte.c’
      Compiling ‘nrfx_spi.c’
      Compiling ‘nrfx_twi.c’
      Compiling ‘nrfx_twim.c’
      Compiling ‘bsp.c’
      Compiling ‘bsp_btn_ble.c’
        nrfx_glue.h
        nrfx.h
        nrf_gpio.h
        boards.h
        bsp.h
        bsp_btn_ble.h
        bsp_btn_ble.c
        static assertion failed: "NRF_SDH_BLE_ENABLED not set!"
        in definition of macro '_SELECT_ASSERT_FUNC'
        in expansion of macro 'STATIC_ASSERT_MSG'
        in expansion of macro 'STATIC_ASSERT'
        in expansion of macro 'NRF_SDH_BLE_OBSERVER'
      Compiling ‘main.c’
        ble_srv_common.h
        main.c
        static assertion failed: "NRF_SDH_BLE_ENABLED not set!"
        in definition of macro '_SELECT_ASSERT_FUNC'
        in expansion of macro 'STATIC_ASSERT_MSG'
        in expansion of macro 'STATIC_ASSERT'
        in expansion of macro 'NRF_SDH_BLE_OBSERVER'
        in expansion of macro 'NRF_BLE_GATT_DEF'
        static assertion failed: "NRF_SDH_BLE_ENABLED not set!"
        in definition of macro '_SELECT_ASSERT_FUNC'
        in expansion of macro 'STATIC_ASSERT_MSG'
        in expansion of macro 'STATIC_ASSERT'
        in expansion of macro 'NRF_SDH_BLE_OBSERVER'
        in expansion of macro 'BLE_ADVERTISING_DEF'
        static assertion failed: "NRF_SDH_SOC_ENABLED not set!"
        in definition of macro '_SELECT_ASSERT_FUNC'
        in expansion of macro 'STATIC_ASSERT_MSG'
        in expansion of macro 'STATIC_ASSERT'
        in expansion of macro 'NRF_SDH_SOC_OBSERVER'
        in expansion of macro 'BLE_ADVERTISING_DEF'
        static assertion failed: "NRF_SDH_BLE_ENABLED not set!"
        in definition of macro '_SELECT_ASSERT_FUNC'
        in expansion of macro 'STATIC_ASSERT_MSG'
        in expansion of macro 'STATIC_ASSERT'
        in expansion of macro 'NRF_SDH_BLE_OBSERVER'
        'BSP_INIT_LED' undeclared (first use in this function)
        each undeclared identifier is reported only once for each function it appears in
      Compiling ‘app_mpu.c’
        app_mpu.c
        #warning "INFO: The MPU is using TWI drivers." [-Wcpp]
    Build failed

  • You get these errors because you try to run the example in SDK 15.2.0. The Git repository say the examples have been written and tested for SDK 14.2.0, this is the version you have to use.

    Please clone the mpu repository into examples directory in SDK v14.2.0. Then delete the entire nrf5-ble-mpu-simple directory, and extract the following: nrf5-ble-mpu-simple.zip

    I have created the project for you.

Related