I am developing on a custom board using the NRF52811 processor in Zephyr 3.2.99. We have a Kailh CEN985012R20-1 Quadrature Encoder mounted on the board with thne A/B encoder pins connected to GPIO's on the processor. Zephyr's sample code provides a .dts overlay for an ST board as follows:
/ { aliases { qdec0 = &qdec; }; }; &timers3 { status = "okay"; qdec: qdec { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6 &tim3_ch2_pa7>; pinctrl-names = "default"; st,input-polarity-inverted; st,input-filter-level = <FDIV32_N8>; st,counts-per-revolution = <16>; }; };
Then the sample code uses Zephyr sensor driver API's to read the A/B encoder inputs, I'm assuming using the interrupt defined in the qdec dtsi. It is a clean, elegant solution which would suit or needs very well. I have reviewed the NRFX quadrature driver API's but I would really love to avoid using complex, vendor specific drivers. We do not need absolute positioning or RPM counts, etc. We only need relative postioning (plus or minus) in "clicks" for every turn of the dial.
There are qdec and timer nodes defined in the nrf52811.dtsi file. I simply need to know how the ST.dts properties map to the NRF properties. Other examples I have found on this forum use deprecated properties for the pin outs. I can overcome that issue by using pinctrl schemas from othe nodes I have defined in my device tree files. But i am curious about the other properties in that node.
Our customer is quite anxious as we are about to got to production with this board and this is the last peripheral I have to configure.
Thank you in advance,
Drew