0

ADXL343 Interrupt strange behavior Itsybitsy M4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ADXL343 Interrupt strange behavior Itsybitsy M4

by qniens on Thu Jun 17, 2021 7:16 am

Hello,

The example "interrupts" only works on a Itsybitsy M4 when you choose
Code: Select all | TOGGLE FULL SIZE
#define INPUT_PIN_INT1   (2) // Uno = (2)
#define INPUT_PIN_INT2   (3) // Uno = (3)
Because you cannot use pin 5 because of the 5V buffer.

If you choose another pin than 3, strange things will happen:
Code: Select all | TOGGLE FULL SIZE
#define INPUT_PIN_INT1   (2) // Uno = (2)
#define INPUT_PIN_INT2   (12) // Uno = (3)
Now only int2_isr will be called. int1_isr is never triggered.
(I also changed the wire from pin 3 to pin 12)

Even stranger, if you swap the pins:
Code: Select all | TOGGLE FULL SIZE
#define INPUT_PIN_INT1   (12) // Uno = (2)
#define INPUT_PIN_INT2   (2) // Uno = (3)

Then also only int2_isr will be called!
Is there a problem with the attachInterrupt on the ItsyBitsy M4?

Best regards,
Quinten

qniens
 
Posts: 11
Joined: Tue Jul 30, 2019 3:14 am

Please be positive and constructive with your questions and comments.