Skip to main content
Visitor II
April 26, 2023
Question

STM32F429ZITx resets whenever PE1 pin pulled to GND by a npn type sensor.

  • April 26, 2023
  • 6 replies
  • 2815 views

This is very weird problem as I have never experienced this kind of problem before.

The board is hooked up to several NPN type limit sensor and connected PE0, PE1 etc.

Every pins are defined as EXTI with Rising/Falling edge trigger and has been working good until I figured out that PE1 pulled by the limit sensor causes resetting the MCU.

I tried to add breakpoint at the beginning of IQR handler but it resets even before triggering an ISR.

Anyone knows about this issue?

I am using up to date cubeMX 6.8.0.

    This topic has been closed for replies.

    6 replies

    Graduate II
    April 26, 2023

    Sounds like the interrupt is triggered, tries to jump to IRQ handler, but that is somehow where it's not supposed to be.

    Why is the MCU reset?

    Hard Fault handler that causes a reset?

    Or jump to memory nirvana which somehow gets to start of PC again?

    Does PE1 use the same IRQ handler as the other EXTI?

    Check the map / list files where the corresponding IRQ handler is placed.

    Graduate II
    April 26, 2023

    Or maybe a hardware issue:

    I suppose you have a pull-up to VCC at the npn collector.

    If that pull-up is too low, like accidentally placed 10R instead of 10k, then VCC is shortened and will cause the MCU to reset.

    KYou.1Author
    Visitor II
    April 26, 2023

    The limit switch is working with 5V and PE1 is connected as below.

    All other pins works just fine.

    I don't know why this pin doesn't even trigger an ISR and simply reset the MCU as if it is like NRST pin.


    _legacyfs_online_stmicro_images_0693W00000bisdDQAQ.png

    Super User
    April 26, 2023

    Short between PE1 and neighbouring PDR_ON pin?

    JW

    KYou.1Author
    Visitor II
    April 26, 2023

    I checked the design and found PDR_ON pin near the PE1 left un-connected but there's no short between them.

    Is it possible they can become somehow shorted together after power on?

    Super User
    April 27, 2023

    > found PDR_ON pin near the PE1 left un-connected

    Connect PDR_ON to VDD.

    JW

    Graduate II
    April 26, 2023
    • Checked R109?
    • Have you connected a scope and checked what the hardware is doing?
    • And you're sure that the npn is connected that way, with EXTI_1 connected to the npn's base? I would expect the level of EXTI_1 to be permanently at about 0.7V (base-emitter diode) or so...
    KYou.1Author
    Visitor II
    April 27, 2023

    Please take a look at below output.

    CH1(Yello) is hooked up to the PE1 pin

    CH2 (Green) is hooked up to a gpio toggle from the program.

    As soon as the PE1 pin goes high(the limit sensor is cleared), the toggle output stops.

    After a one or two seconds the program restarts again.


    _legacyfs_online_stmicro_images_0693W00000biupLQAQ.png

    Graduate II
    April 27, 2023

    So it's PE1 going HIGH that seems to be the trouble, not LOW.

    > Connect PDR_ON to VDD.

    Have you done what Jan said?

    Have you checked the other things we mentioned?

    If yes and the problem still persists, it's time to post some source code concerning that GPIO init, interrupt init, interrupt handler, etcpp...

    KYou.1Author
    Visitor II
    May 3, 2023

    The reason I said the problem is at PE1 LOW because it was normally HIGH and program shuts down when PE1 becomes HIGH from LOW state.

    I will try to Jan's idea but I need to modify the PCB.