2022-05-05 01:47 AM
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
Solved! Go to Solution.
2022-05-05 09:56 AM
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!
2022-05-05 01:58 AM
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.
2022-05-05 02:13 AM
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.
2022-05-05 06:25 AM
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.
2022-05-05 09:56 AM
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!