This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

adding QDEC_NRFX to a project

please advice how to add "QDEC_NRFX" to the project configuration of 5340

1. it's not on the default menu config

2. I have tried adding under "ncs\v1.4.99-dev1\zephyr\samples\bluetooth\peripheral_hr\build_nrf5340pdk_nrf5340_cpuapp\zephyr/.config"

as : 

#
# Device Drivers
#
CONFIG_HW_CC3XX=y
CONFIG_HW_CC3XX_NAME="HW_CC3XX_0"
# CONFIG_ETH_RTT is not set
CONFIG_SENSOR=y
# CONFIG_BH1749 is not set
# CONFIG_SENSOR_SIM is not set
# CONFIG_PMW3360 is not set
# CONFIG_PAW3212 is not set
CONFIG_QDEC_NRFX=y              <---- this is the addition

but I still can not select from segger "configure nrf project"

my question is : 

A. how do I add it properlly, what is the advised location ? 

B. what are the steps to add it to compile with the project ? (I belive I should do an overlay file under the project with the specific pin configurations for my board)

thank you 

Parents
  • Hi!

    First of all, QDEC support is still not officially supported by NCS, but you can apply this pull request in the meantime. I'm not sure why the configuration isn't present under the default menuconfig, but it seems like you are using the wrong name. It should be CONFIG_NRFX_QDEC=y

    A: You can permanently change the configuration of your application by editing the file "prj.conf" in the project directory. This will also be reflected in Segger Embedded Studio when the project is reopened. 

    B: Overlays are required to enable and configure some peripherals. For the nRF5340DK you can add the file "nrf5340dk_nrf5340_cpuapp.overlay" in the project directory and your desired configuration there. Here's the setup for QDEC:

    &qdec {
        compatible = "nordic,nrf-qdec";
        status = "okay";
        a-pin = < pin-number >;
        b-pin = < pin-number >;
        led-pre = < x >;
        steps = < x >;
    };

    Details about the different parameters can be found in the QDEC yaml file.

    I hope this works for you.

    Best regards,
    Carl Richard

  • I have managed to add QDEC, I can now select and configure it 

Reply Children
Related