cancel
Showing results for 
Search instead for 
Did you mean: 

Falling edge trigger extternal interrupt not detected because different TTL levels?

BCano.1
Associate III

I have problems detecting a falling edge external interrupt. I can see with the tester the signal changes from 3.2v to 0v so its produced but the the interrupt is not generated. Could the 3.2v instead of 3.3v the problem?Signal is oscillating 3.19-3.20 all the time.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

I have done some tests with a logic analyzer and can confirm that the signal is not changing when it should so the problem was the sensor. I dont understand completely the problem because i dont have enough electronics knowledge, but the sensor was failing when was connected to an external power supply even i have GND pins bridged and TTL levels seems to be fine.

Powering the sensor from the 5V pin of the MCU the interrupt generates ok and is handled correctly so the software and the hardware was ok except for the power supply. I dont know if its introducing noise or what.

Problem solved!

View solution in original post

4 REPLIES 4
LCE
Principal

No, that should not be the problem.

Check the register and interrupt settings.

> Signal is oscillating 3.19-3.20 all the time.

That's called voltage ripple / noise, and it could even be your measurement setup which causes that.

BCano.1
Associate III

What i said before is not right. I did some more testing and i don't know what is happening. The pin is configured as GPIO_EXTI1 but it has 3.2v when nothing is connected to it. So the 3.2v signal is from the MCU itself.

The pin in GPIO panel is configured as External interrupt mode with falling edge trigger detection and Pull-Up.

Signal from the sensor is close to 0 if a deattach the pin. 0.18v.

Then probably the internal GPIO pull-up is active, still no problem.

And 0.18V should also be no problem.

Sure that your "sensor" really sometimes switches from high to low?

Check the GPIO registers and the ISR and the corresponding bits.

Anyway, you don't show any source, and you don't tell us which MCU and sensor you're using.

I have done some tests with a logic analyzer and can confirm that the signal is not changing when it should so the problem was the sensor. I dont understand completely the problem because i dont have enough electronics knowledge, but the sensor was failing when was connected to an external power supply even i have GND pins bridged and TTL levels seems to be fine.

Powering the sensor from the 5V pin of the MCU the interrupt generates ok and is handled correctly so the software and the hardware was ok except for the power supply. I dont know if its introducing noise or what.

Problem solved!