Search found 4 matches

by alepagliaccio
Thu Jul 04, 2024 9:44 am
Forum: ESP-IDF
Topic: ESP32 C6 PCNT
Replies: 4
Views: 1101

Re: ESP32 C6 PCNT

The issue that was occuring was due me having a watchdog to other values other than the High limit (forgot them from the example). Now the counter Is flawless. Now i wanted to also have ble scanning in the background. It Will be constant, when Active It often interfers with the pcnt and makes me los...
by alepagliaccio
Mon Jul 01, 2024 8:26 pm
Forum: ESP-IDF
Topic: ESP32 C6 PCNT
Replies: 4
Views: 1101

Re: ESP32 C6 PCNT

You may well be witnessing the effects of a race condition between two events/interrupts: If the PCNT overflow occurs while a PPS GPIO interrupt is on its way to being handled (or vice-versa), the GPIO ISR may see an old/stale value in overflow_count (low by 1) and combine that value with the curre...
by alepagliaccio
Mon Jul 01, 2024 8:17 pm
Forum: ESP-IDF
Topic: ESP32 C6 PCNT
Replies: 4
Views: 1101

Re: ESP32 C6 PCNT

You may well be witnessing the effects of a race condition between two events/interrupts: If the PCNT overflow occurs while a PPS GPIO interrupt is on its way to being handled (or vice-versa), the GPIO ISR may see an old/stale value in overflow_count (low by 1) and combine that value with the curre...
by alepagliaccio
Sat Jun 29, 2024 7:44 am
Forum: ESP-IDF
Topic: ESP32 C6 PCNT
Replies: 4
Views: 1101

ESP32 C6 PCNT

Hello, I'm using a pcnt to count pules from a 10mhz ocxo. I get pretty stable results using a gps pps, sometimes 9,999,999 instead of 10 million but thats acceptable. But sometimes after about 1 minute I get a reading thats off by like 40000 pulses (approx), two readings off like this so 2 seconds a...