Hi Tomek,

Please take a look:

https://github.com/apache/nuttx/blob/master/arch/xtensa/src/esp32/esp32_qencoder.c

It was tested with common rotary encoders (i.e. those used on 3D
Printers to select items on UI menu).

I didn't test it at high frequencies, but according with this thread
https://esp32.com/viewtopic.php?t=7011 it could work up to 40MHz (APB
Freq / 2) if you disable the input filter.

BR,

Alan

On 2/18/23, Tomek CEDRO <to...@cedro.info> wrote:
> Hello world :-)
>
> Is PCNT peripheral supported on ESP32 port in NuttX?
>
> I am building a new device that will use industrial rotary encoder
> with pulses up to 1..3MHz so GPIO/IRQ processing is probably not a
> good idea.
>
> I am wondering if there are such rotary use cases in NuttX?
>
> I wanted to use RISC-V CPU.. I have whole bunch of ESP32-C3.. but it
> has no PCNT peripheral that sounds like a perfect candidate for the
> task.. so I will probably use ESP32 :-)
>
> Any hints welcome :-)
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>

Reply via email to