ULP pulse counter not working properly
Posted: Wed Feb 10, 2021 5:53 am
Hello!
I'm trying to use esp32 ulp to count pulses of an input signal on one of rtc gpio's. I'm using the example code from ESP-IDF so I assume it should work properly. However, it is not working to me. It counts more edges in the signal than it should. I thought it was a noise problem in the signal but I've constantly checked the input signal with my oscilloscope and the signal remains perfect all the time. The problem I'm experiencing is not due to debounce either, as the code itself provides debounce filtering by software logic. So I don't know why is it happening. The number of edges detected with ulp changes when I change ulp wake period, but doesn't change in a uniform way. No matter hoy I change wake period of ulp, number of edges incresases or decreases randomly. I've looked up for information or someone experiencing this same trouble but till now unsuccesfully. So if someone could give some hint about this or any help I would appreciate it a lot. Thanks in advance!
I'm trying to use esp32 ulp to count pulses of an input signal on one of rtc gpio's. I'm using the example code from ESP-IDF so I assume it should work properly. However, it is not working to me. It counts more edges in the signal than it should. I thought it was a noise problem in the signal but I've constantly checked the input signal with my oscilloscope and the signal remains perfect all the time. The problem I'm experiencing is not due to debounce either, as the code itself provides debounce filtering by software logic. So I don't know why is it happening. The number of edges detected with ulp changes when I change ulp wake period, but doesn't change in a uniform way. No matter hoy I change wake period of ulp, number of edges incresases or decreases randomly. I've looked up for information or someone experiencing this same trouble but till now unsuccesfully. So if someone could give some hint about this or any help I would appreciate it a lot. Thanks in advance!