Hi,
I'm working on nrf51822 and mpu9250 imu sensor.i'm facing a problem,my buttons function i.e buttons leds int and mpu9250 are not working together either one is working at a time,i'm unable to find the problem.please help me..
thanks in advance.
Hi,
I'm working on nrf51822 and mpu9250 imu sensor.i'm facing a problem,my buttons function i.e buttons leds int and mpu9250 are not working together either one is working at a time,i'm unable to find the problem.please help me..
thanks in advance.
In your code nrf_drv_gpiote_is_init() will return an error if the GPIOTE is already initialized and your application will hang or reset in APP_ERROR_CHECK(). If you do it like this:
uint32_t err_code;
if(!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
}
as is suggested here you will simply skip the initialization if it is already done before.
In your code nrf_drv_gpiote_is_init() will return an error if the GPIOTE is already initialized and your application will hang or reset in APP_ERROR_CHECK(). If you do it like this:
uint32_t err_code;
if(!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
}
as is suggested here you will simply skip the initialization if it is already done before.