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

MMA8453 interface with BLE

Dear Nordic Team,

Thanks for supporting.

Currently i am working with MMA8453 accelerometer . I already interface with nRF51422 using TWI it is working fine. The sensor interrupt pin is connect with GPIO interrupt. Everything is ok for TWI example code.

Now i want to interface ble_app_proximity example code. When i was enable the GPIO interrupt in ble_app_proximity code this application is not work. I dont know what i am doing wrong. Please support . my code main.c

My Hardware : PCA10028 SDK : 11.0

Parents
  • Thanks for reply. The advertising_start() returns always zero. But whenever where it is i call below function the system is going to be hang.

    static void gpio_init(void)
    {
        ret_code_t err_code;
    
        err_code = nrf_drv_gpiote_init();
        APP_ERROR_CHECK(err_code);
        
        //nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);
    
        //err_code = nrf_drv_gpiote_out_init(PIN_OUT, &out_config);
        //APP_ERROR_CHECK(err_code);
    
        nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
        in_config.pull = NRF_GPIO_PIN_PULLUP;
    
        err_code = nrf_drv_gpiote_in_init(DEVICE_INT_PIN, &in_config, in_pin_handler);
        APP_ERROR_CHECK(err_code);
    
        nrf_drv_gpiote_in_event_enable(DEVICE_INT_PIN, true);
    }
    
Reply
  • Thanks for reply. The advertising_start() returns always zero. But whenever where it is i call below function the system is going to be hang.

    static void gpio_init(void)
    {
        ret_code_t err_code;
    
        err_code = nrf_drv_gpiote_init();
        APP_ERROR_CHECK(err_code);
        
        //nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);
    
        //err_code = nrf_drv_gpiote_out_init(PIN_OUT, &out_config);
        //APP_ERROR_CHECK(err_code);
    
        nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
        in_config.pull = NRF_GPIO_PIN_PULLUP;
    
        err_code = nrf_drv_gpiote_in_init(DEVICE_INT_PIN, &in_config, in_pin_handler);
        APP_ERROR_CHECK(err_code);
    
        nrf_drv_gpiote_in_event_enable(DEVICE_INT_PIN, true);
    }
    
Children
No Data
Related