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.

Related