nRF54L15 QEDC

I want to use a hardware encoder to implement a mouse scroll wheel. Do you provide a QEDC routine for me to quickly learn and use? Are there any specific pin requirements for QEDC? Can I use any port and pin freely?

  • 1. When I searched in the Nordic search bar, it also popped up at the address you gave me in this comment, but I am still confused because it is all about registers and there is no corresponding application code??


    2. I think it's important to provide application code and examples to improve my development efficiency. Similar to STM32, downloading a Library can directly write all the examples and provide corresponding API manuals?


    3. And now, almost all of my development with Nordic is based on the application code provided by Zephyr, such as gpio_pin_get.dt. However, when I search for it, the code given to me is Nordic, and the parameter passing between the two is different. I am very confused

  • Hi,

    LinJunXuan said:

    1. When I searched in the Nordic search bar, it also popped up at the address you gave me in this comment, but I am still confused because it is all about registers and there is no corresponding application code??


    2. I think it's important to provide application code and examples to improve my development efficiency. Similar to STM32, downloading a Library can directly write all the examples and provide corresponding API manuals?

    Can you elaboraate on what application code you are looking for? You do no need anyhign other than what is demonstrated in the Quadrature Decoder Sensor sample (the code for this sample is found under zephyr/samples/sensor/qdec/  - here). This demonstrate using the driver. You do not need to look into the driver implementation, but from the Zephyr API this calls into the nrfx driver implemented in qdec_nrfx.c.

    Regarding API, the QDEC impelmentation use the generic Sensor API, which you can find documentation for here. This is a generic API that covers a lot though, so I suggest focusing on the sample first as that shows only what you need for QDEC.

    LinJunXuan said:
    3. And now, almost all of my development with Nordic is based on the application code provided by Zephyr, such as gpio_pin_get.dt. However, when I search for it, the code given to me is Nordic, and the parameter passing between the two is different. I am very confused

    Can you elaborate on this?


  • Isn't this NRF code


    Thank you for your patient response above

  • Hi,

    LinJunXuan said:
    Isn't this NRF code

    Yes, this is from the low-level SPIS nrfx driver. Generally the nrfx drivers are low-level and can be used directly, but for most there als exist a Zephyr API on top that is normally what is recommended. You are free to use the nrfx QSPI driver direclty as well if you like (see nrfx_qdec.h), but I would recommend the Zephyr APIs and we do not have any example for using nrfx_qdec directly.

Related