GPS active causes accelerometer interrupt

Hi,

When GPS runs the scan method, the accelerometer IRQs are called on pin ACCEL_INT1. If leave_on parameter of the scan method was set to true, the IRQs continues until the GPS is turned off.

How I can solve? Is it possible remove accelerometer IRQs when GPS is on?

Accelerometer interrupt configuration:


pinMode(ACCEL_INT1, INPUT);
attachInterrupt(digitalPinToInterrupt(ACCEL_INT1), ACC_interrupt_function, CHANGE);

void ACC_interrupt_function(void)
{
if (digitalRead(ACCEL_INT1))
{

}
}

GPS configuration:

sodaq_gps.init(GPS_ENABLE);

The board used is SODAQ SARA N211: http://support.sodaq.com/sodaq-one/sara/

SODAQ_Ublox_GPS scan method: https://github.com/SodaqMoja/Sodaq_UBlox_GPS/

Thank you,

AI

Hello :wave: someone who can help me?

Can you try using the attachInterrupt() call without the digitalPinToInterrupt() macro.
Just send ACCEL_INT1 as the first parameter.