Interrupt is not working in portenta (A6, GPIO2)

I am using portenta h7 for the project.

Currently, I want to register and use 5 interrupts.
The code is implemented as below.
Only one of the A6 interrupt and GPIO2 interrupt operates normally.

Only the last declared interrupt is running. What should I do?

#define GPIO2 (78u)
#define GPIO5 (125u)
#define GPIO6 (132u)
#define PA_4 (21u) //A6
#define PA_6 (22u) //A7

byte CART_DET = GPIO2;
byte KEY_LEFT = A7; // ADC A7
byte KEY_RIGHT = A6; // ADC A6
byte KEY_ESC = GPIO5; // GPIO5 PG3
byte KEY_ENTER = GPIO6; // GPIO6 PG10

pinMode(KEY_LEFT, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(KEY_LEFT),key_isr_left,FALLING);

pinMode(KEY_ENTER, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(KEY_ENTER),key_isr_enter,FALLING);

pinMode(KEY_ESC, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(KEY_ESC),key_isr_esc,FALLING);

pinMode(KEY_RIGHT, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(KEY_RIGHT),key_isr_right,FALLING);

pinMode(CART_DET, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(CART_DET), dev_cart_det_isr, CHANGE);

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.