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?

Parents
  • Hi,

    The nRF54L15 has a QDEC peripheral and the use of that is demonstrated i the Quadrature Decoder Sensor sample.

  • But this example is from STM32. Regarding this issue, I asked AI frantically, and they provided incorrect answers. I am now feeling very frustrated, and STM32 states that a Timer timer is required. I am not sure if Nordic's QDEC is also needed. I tried using this demo, and every time I searched for some demos on the HTTP website you provided me, such as Nordic's storage of Flash and Timer, there were too many things popping up every time. I just want to see the demo. Can you provide a better shortcut or have a better PDF document

  • Hi,

    The example works on nRF54L15 DK. You can see that there is an overlay for that specific DK under the board folderer in the project: nrf54l15dk_nrf54l15_cpuapp.overlay. This is the only QDEC example we have avaialble.

  • Thank you very much for your help,Is QDEC the corresponding application code?
    Sometimes when I search for Nordic code, sometimes based on Zephyr, sometimes on Nordic Hal, it's really confusing

  • Hi,

    LinJunXuan said:
    Thank you very much for your help,Is QDEC the corresponding application code?

    I can you elaborate the question? The sample I linked to demonstrate how to use the QDEC Zephyr driver, and when usig with a nRF54L15 this will use the QDEC peripheral.

    LinJunXuan said:
    Sometimes when I search for Nordic code, sometimes based on Zephyr, sometimes on Nordic Hal, it's really confusing

    Thank you for the feedback, that is a problem we are aware of and looking into. The samples that are form Zephyr not officially supported, but can often be usefull non the less and Nordic contributes to many of them them (as has been the case for the QDEC sample).

  • 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?

Reply
  • 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?

Children
Related