Hi,
I've written code to use the "gpiote in event" to sense an interrupt from a peripheral (acceleromenter), but as soon as I enable the in event, I notice the current consumption is a lot higher.
if (!nrf_drv_gpiote_is_init())
{
error_code = nrf_drv_gpiote_init();
VERIFY_SUCCESS(error_code);
}
nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
error_code = nrf_drv_gpiote_in_init(LIS2DH_INT1, &config, lis2dhInt1Handler);
if (error_code)
{
return error_code;
}
nrf_drv_gpiote_in_event_enable(LIS2DH_INT1, true);
Reading some of the other questions on devzone, it looks like this is a problem on the nRF51, and that I need to use port based interrupt sensing.
Is there an example of how to use this?
Also. From what I have read, the port method does not respond quickly, but I don't know what this means. Does it wake the processor if sleeping, does the pin need to be HIGH (or low for that matter), for a specific period of time in order to trigger the interrupt sensing ?