nrf5340dk build error with CONFIG_QDEC_NRFX and CONFIG_SENSOR enabled

Hello,

I am using an nrf5340dk and I am trying to create a qdec sample using as reference the wheel module.

I have added set the CONFIG_SENSOR and CONFIG_QDEC_NRFX to y and also added an .overlay file in /boards directory of my project folder (following the instructions here https://docs.zephyrproject.org/latest/build/dts/howtos.html#set-devicetree-overlays

The overlay file includes the following:

&qdec {
status = "okay";
a-pin = <3>;
b-pin = <28>;
enable-pin = <30>;
led-pin = <0xFFFFFFFF>;
led-pre = <0>;
steps = <24>;
};

However when I build the project using the SES, I get the following error:

'DT_N_S_soc_S_peripheral_50000000_S_qdec_33000_P_steps' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_qdec_33000_P_status'?

It looks like I am doing something wrong with the device tree configuration.

Parents Reply
  • Hi again,

    Unfortunately I do not have any sample code for this to give you.

    My best bet to make this work before the next release, would require you to look at how the nrfx driver sets up QDEC0 and try to replicate that for QDEC1 in some way. If it even is possible, this would be very difficult to do properly, and you would mostly be on your own if you go this route.

Children
Related