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

InvenSense DMP and MPL porting problem, data ready interrupt not working

Hello everyone,

I am currently working on porting the InvenSense motion driver 6.12 to nrf52.

I am using MPU9250 and nrf52840 pdk.

I've managed to set up the DMP and MPL, but I got stuck when I trying to read data from DMP FIFO.

I am instructed to call function dmp_read_fifo whenever a data ready interrupt is detected. I connected pin INT of MPU to P1.08 of nrf52840pdk.

Here is how I set up the interrupt:

#define ARDUINO_7_PIN               NRF_GPIO_PIN_MAP(1, 8)
#define PIN_IN ARDUINO_7_PIN 

static void pin_in_read(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
		hal.new_gyro = 1; //set data ready indicator
}

static void GPIO_setup()
{
	uint32_t err_code = nrf_drv_gpiote_init();
	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(PIN_IN, &in_config, pin_in_read);
    APP_ERROR_CHECK(err_code);			
}

However hal.new_gyro is never set. Does anyone meet the same problem?

My project can be found here.

Thanks in advance.

Parents Reply Children
No Data
Related