Hello NRF Community, I am trying to interface the Adafruit PDM MEMS Microphone (Link: https://www.adafruit.com/product/3492) with my nrf52832dk. However, it fails every time. My ncs version is 3.0.0. I am providing my code for the reference.
Everytime I see this log:-
FAILED: modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c.obj
C:\ncs\toolchains\0b393f9e1b\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCONFIG_GPIO_AS_PINRESET -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DNRF52832_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v3.0.0/pdmMicNRF/build/pdmMicNRF/zephyr/include/generated/zephyr -IC:/ncs/v3.0.0/zephyr/include -IC:/ncs/v3.0.0/pdmMicNRF/build/pdmMicNRF/zephyr/include/generated -IC:/ncs/v3.0.0/zephyr/soc/nordic -IC:/ncs/v3.0.0/zephyr/soc/nordic/nrf52/. -IC:/ncs/v3.0.0/zephyr/soc/nordic/common/. -IC:/ncs/v3.0.0/nrf/include -IC:/ncs/v3.0.0/nrf/tests/include -IC:/ncs/v3.0.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v3.0.0/zephyr/modules/cmsis/. -IC:/ncs/v3.0.0/nrf/modules/hal_nordic/. -IC:/ncs/v3.0.0/modules/hal/nordic/nrfx -IC:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v3.0.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v3.0.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v3.0.0/modules/debug/segger/SEGGER -IC:/ncs/v3.0.0/modules/debug/segger/Config -isystem C:/ncs/v3.0.0/zephyr/lib/libc/common/include -fno-strict-aliasing -Os -imacros C:/ncs/v3.0.0/pdmMicNRF/build/pdmMicNRF/zephyr/include/generated/zephyr/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v3.0.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v3.0.0/pdmMicNRF=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v3.0.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v3.0.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -std=c99 -MD -MT modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c.obj -MF modules\hal_nordic\modules\hal_nordic\nrfx\CMakeFiles\modules__hal_nordic__nrfx.dir\C_\ncs\v3.0.0\modules\hal\nordic\nrfx\drivers\src\nrfx_pdm.c.obj.d -o modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c.obj -c C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:68:5: error: unknown type name 'nrfx_nrfx_pdm_buffer_set_t'
68 | nrfx_nrfx_pdm_buffer_set_t event_handler; ///< Event handler function pointer.
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c: In function 'pdm_init':
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:177:25: warning: assignment to 'int' from 'nrfx_pdm_event_handler_t' {aka 'void (*)(const nrfx_pdm_evt_t *)'} makes integer from pointer without a cast [-Wint-conversion]
177 | p_cb->event_handler = event_handler;
| ^
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c: In function 'irq_handler':
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:640:13: error: called object is not a function or function pointer
640 | p_cb->event_handler(&evt);
| ^~~~
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:654:17: error: called object is not a function or function pointer
654 | p_cb->event_handler(&evt);
| ^~~~
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:677:13: error: called object is not a function or function pointer
677 | p_cb->event_handler(&evt);
| ^~~~
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:685:13: error: called object is not a function or function pointer
685 | p_cb->event_handler(&evt);
| ^~~~
C:/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_pdm.c:699:9: error: called object is not a function or function pointer
699 | p_cb->event_handler(&evt);
| ^~~~
[81/122] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
[82/122] Building C object zephyr/kernel/CMakeFiles/kernel.dir/busy_wait.c.obj
[83/122] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
[84/122] Linking C static library zephyr\drivers\serial\libdrivers__serial.a
[85/122] Linking C static library modules\segger\libmodules__segger.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' --build C:/ncs/v3.0.0/pdmMicNRF/build/pdmMicNRF
* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it. pdmMicNRF.zipCan somebody please help me with my code or provide me an example code on how to interface and get the readings of the PDM mic in nrf52832dk.
Thanks in advance!