Skip to main content
Associate III
June 8, 2025
Solved

Can't get grip on PA1 interrupt

Hi,

I fell in love with this cute little uC and created all kinds of succesfull projects.
Now I have a problem. I want to decode DCF77 time signals. I bought me a few DCF77 receivers from China. They all work fine. I connected the data output of the DCF77 to the STM8S103 uC portpin PA1. I configured the port interrupt to only react on high-going edges. Even if the PA1 signal is low, when enabling the PA1 interrupt more than 1 interrupts are executed. I tried many things.
- inside the interrupt handler dummy read the GPIOA->IDR
- inside the interrupt handler keep track if its the first or next entry it turns out also the next entry is executed
- changed the interrupt type to raising-edge-only, same behaviour

But nothing helps,
who can help me out?

    This topic has been closed for replies.
    sthvwBest answer
    Associate III
    June 16, 2025

    Well, as nobody replies, and after some more investigation I will answer myself. It turns out that when configuring a port-pin as Input-Float then an interrupt is generated continuously even if the pin is connected to GND or VCC. When configuring it as Input-Pullup then it behaves as expected.

    Thanks for watching.

    1 reply

    sthvwAuthorBest answer
    Associate III
    June 16, 2025

    Well, as nobody replies, and after some more investigation I will answer myself. It turns out that when configuring a port-pin as Input-Float then an interrupt is generated continuously even if the pin is connected to GND or VCC. When configuring it as Input-Pullup then it behaves as expected.

    Thanks for watching.