cancel
Showing results for 
Search instead for 
Did you mean: 

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

KYou.1
Associate II

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.

10 REPLIES 10
LCE
Principal

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.

LCE
Principal

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.1
Associate II

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

Short between PE1 and neighbouring PDR_ON pin?

JW

LCE
Principal
  • 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...

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?

KYou.1
Associate II

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

> found PDR_ON pin near the PE1 left un-connected

Connect PDR_ON to VDD.

JW

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...