Skip to main content
Associate
January 7, 2026
Question

STM8L052R8T6 – External interrupt on same pin number with different ports (PC0 & PF0)

  • January 7, 2026
  • 1 reply
  • 432 views

Dear ST Team,

I am using STM8L052R8T6.
I have already configured an external interrupt on PC0 (PORTC, pin 0).
Now I want to configure an external interrupt on PF0 (PORTF, pin 0) as well.

Since both pins have the same pin number but belong to different ports, I would like to know:

Can PC0 and PF0 generate external interrupts independently?

How should the EXTI configuration be done for multiple ports?

Which EXTI registers and interrupt handlers should be used for PORTF?

Could someone please provide guidance or a simple example for configuring external interrupts on PC0 and PF0 on STM8L devices?

Thank you.

    1 reply

    Tesla DeLorean
    Guru
    January 7, 2026

    >>Can PC0 and PF0 generate external interrupts independently?

    No, they combine in a OR sense

    You'd typically pick different pin# for individual sources

    https://www.st.com/resource/en/reference_manual/rm0031-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf#page=161

    "When several input pins connected to the same interrupt line are selected simultaneously, they are logically ORed."

     

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    January 7, 2026
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..