This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interrupt from external Pin doesn't trigger with short pulse?

Hi,
I need to implement a simple external interrupt triggered by another IC on a nrf51822. After searching the devzone I found the example in the GIT repo (github.com/.../nrf51_app_gpiote_example) which I used.

Everything works fine when I use a button, but when I change the pin to the one I actually want, it doesn't work. The signal is a 500ns long pulse (high) with 250Hz. I don't get the interrupt (neither rising nor falling edge). Is the pulse too short to detect? Shouldn't it be the edge that is detected?

Thanks in advance.

Noé

Parents
  • Hi

    The app_gpiote needs to have a pulse of approximately 10us in order to detect the pulse. What app_gpiote library uses internally is the GPIOTE->PORT event. The GPIOTE PORT event handler inside the app_gpiote library needs to read what pin the PORT event was received on, since the port event does not report what pin was asserted. By the time the execution of the GPIOTE interrupt handler starts executing, your signal has gone low again, so the app_gpiote library will detect no assert on a pin and will not notify your application of any pin event.

    To detect a very short pulse, you would need to use the GPIOTE->IN events instead which is tied directly to a specific pin. See the \nRF51_SDK_8.0.0_5fc2c3a\examples\peripheral\pin_change_int example in the nRF51 SDK for code reference. The disadvantage is that using the GPIOTE->IN is a high power operation (~1mA)

  • Hmm, if you are using custom board and if traces are very tight together on the PCB, the signal might penetrate to the adjacent trace, could that be the case? To find out, try to configure the indicator LED to another pin. If that is not it, I would need to see some of your code.

Reply Children
No Data
Related