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

Whats the alternative to GPIOTE In Event ?

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 ?

Parents
  • Thanks Vidar

    Are there any official examples of how to use the PORT method?

    As far as I could see the documentation only has code for the "IN event".

    I think someone posted a question about the PORT method which included their own code, but I hoped these would be official documentation / example code for how to use the PORT method, as I think its completely different from the IN event method (isnt it ?)

Reply
  • Thanks Vidar

    Are there any official examples of how to use the PORT method?

    As far as I could see the documentation only has code for the "IN event".

    I think someone posted a question about the PORT method which included their own code, but I hoped these would be official documentation / example code for how to use the PORT method, as I think its completely different from the IN event method (isnt it ?)

Children
No Data
Related