Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set up interrupts on PA15 and PB15 on STM32G030C8T6, only the later one is ever fired #2645

Closed
dvhx opened this issue Feb 1, 2025 · 1 comment
Labels
invalid This doesn't seem right

Comments

@dvhx
Copy link

dvhx commented Feb 1, 2025

When I attach 2 interrupts on pins PD1 and PA9 it works, both handler1 and handler2 are called correctly:

attachInterrupt(digitalPinToInterrupt(PD1), handler1, FALLING);
attachInterrupt(digitalPinToInterrupt(PA9), handler2, FALLING);

But when I use pins PA15 and PB15 only the second one is ever called. For example if I use this:

attachInterrupt(digitalPinToInterrupt(PA15), handler1, FALLING);
attachInterrupt(digitalPinToInterrupt(PB15), handler2, FALLING);

I only see handler2 called. If I switch order and use this:

attachInterrupt(digitalPinToInterrupt(PB15), handler2, FALLING);
attachInterrupt(digitalPinToInterrupt(PA15), handler1, FALLING);

Only handler1 is called. Complete code is in attachment.

To Reproduce

  • pull down PB15 and PA15, only one handler will be called (whichever was set up last).

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.5 LTS
  • Arduino IDE version: 1.8.19
  • STM32 core version: 2.2.0
  • Upload method: SWD
  • MCU: STM32G030C8T6 in LQFP-48 (custom board)

stm32g_problem_with_PA15_PB15_interrupt.ino.txt

@fpistm
Copy link
Member

fpistm commented Feb 1, 2025

This is normal. EXTI is linked to gpio pin number not gpio port. It is the same for all Px15.

@fpistm fpistm closed this as completed Feb 1, 2025
@fpistm fpistm added the invalid This doesn't seem right label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants