Hi,
My SDK version:9.0 SD:8.0
I use gpiote to generate an interrupt,
static void bma255_int_hook(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
g_int1_triggered = true;
}
uint32_t bma255_int_pin_set(void)
{
uint32_t err_code;
if (!nrf_drv_gpiote_is_init())
{
err_code = nrf_drv_gpiote_init();
if (err_code != NRF_SUCCESS)
{
return err_code;
}
}
nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_HITOLO(false);
config.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(BMA255_SPI_INT1, &config, bma255_int_hook);
if (err_code != NRF_SUCCESS)
{
return err_code;
}
nrf_drv_gpiote_in_event_enable(BMA255_SPI_INT1, true);
return NRF_SUCCESS;
}
But the interrupt cannot be generated, then I capture the waveform from the oscilloscope
The graphs show the interrupt signal can be captured, and it keeps for more than 200us. but the ISR (bma255_int_hook) cannot be executed.
Then I changed the interrupt configuration,
GPIOTE_CONFIG_IN_SENSE_HITOLO(false) --> GPIOTE_CONFIG_IN_SENSE_HITOLO(true)
The ISR (bma255_int_hook) finally can be executed.
True : hi-accuracy false : low-accuracy
However, the current in case "true" is much higher (above 1mA) than "false"(100uA)
The question is, how can the ISR be executed and the current be lowered? Thank you!