Open mariuszmalek opened 2 days ago
I followed the process on this wiki and tried again, but I didn't encounter the error you mentioned.
So why does this error appear?
I suggest you reinstall the XIAO NRF52840 library files and the Seeed_Arduino_Mic library files before attempting again.
I did it and it still doesn't work.
I have tried everything and it still does not work!
When I try to test microphone like in this instruction https://wiki.seeedstudio.com/XIAO-BLE-Sense-PDM-Usage/ then I got error.
Error:
/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp: In member function 'virtual uint8_t NRF52840_ADC_Class::begin()': /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:36:52: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_freq_t' for argument '1' to 'void nrf_pdm_clock_set(nrf_pdm_freq_t)' nrf_pdm_clock_set(NRF_PDM, NRF_PDM_FREQ_1280K); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:39:52: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_freq_t' for argument '1' to 'void nrf_pdm_clock_set(nrf_pdm_freq_t)' nrf_pdm_clock_set(NRF_PDM, NRF_PDM_FREQ_2667K); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:47:78: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_mode_t' for argument '1' to 'void nrf_pdm_mode_set(nrf_pdm_mode_t, nrf_pdm_edge_t)' nrf_pdm_mode_set(NRF_PDM, NRF_PDM_MODE_STEREO, NRF_PDM_EDGE_LEFTFALLING); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:51:76: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_mode_t' for argument '1' to 'void nrf_pdm_mode_set(nrf_pdm_mode_t, nrf_pdm_edge_t)' nrf_pdm_mode_set(NRF_PDM, NRF_PDM_MODE_MONO, NRF_PDM_EDGE_LEFTFALLING); ^ In file included from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf.h:79:0, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/cmsis.h:21, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_SEEED_XIAO_NRF52840_SENSE/PinNames.h:22, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/variants/SEEED_XIAO_NRF52840_SENSE/pinmode_arduino.h:17, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/Arduino.h:26, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/base_mic.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:1: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2453:42: error: invalid conversion from 'NRF_PDM_Type*' to 'nrf_pdm_gain_t {aka unsigned char}' [-fpermissive]
define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE)
/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:61:20: note: in expansion of macro 'NRF_PDM' nrf_pdm_gain_set(NRF_PDM, _gain, _gain); ^
~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:61:41: error: too many arguments to function 'void nrf_pdm_gain_set(nrf_pdm_gain_t, nrf_pdm_gain_t)' nrf_pdm_gain_set(NRF_PDM, _gain, _gain); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:335:22: note: declared here __STATIC_INLINE void nrf_pdm_gain_set(nrf_pdm_gain_t gain_l, nrf_pdm_gain_t gain_r) ^~~~In file included from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf.h:79:0, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/cmsis.h:21, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_SEEED_XIAO_NRF52840_SENSE/PinNames.h:22, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/variants/SEEED_XIAO_NRF52840_SENSE/pinmode_arduino.h:17, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/Arduino.h:26, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/base_mic.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:1: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2453:42: error: invalid conversion from 'NRF_PDM_Type*' to 'uint32_t {aka long unsigned int}' [-fpermissive]define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE)
/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:69:24: note: in expansion of macro 'NRF_PDM' nrf_pdm_psel_connect(NRF_PDM, digitalPinToPinName(_clkPin), digitalPinToPinName(_dinPin)); ^
~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:69:91: error: too many arguments to function 'void nrf_pdm_psel_connect(uint32_t, uint32_t)' nrf_pdm_psel_connect(NRF_PDM, digitalPinToPinName(_clkPin), digitalPinToPinName(_dinPin)); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:311:22: note: declared here __STATIC_INLINE void nrf_pdm_psel_connect(uint32_t psel_clk, uint32_t psel_din) ^~~~~~~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:72:53: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:73:49: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_END); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:74:53: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STOPPED); ^ In file included from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf.h:79:0, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/cmsis.h:21, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_SEEED_XIAO_NRF52840_SENSE/PinNames.h:22, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/variants/SEEED_XIAO_NRF52840_SENSE/pinmode_arduino.h:17, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/Arduino.h:26, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/base_mic.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:1: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2453:42: error: invalid conversion from 'NRF_PDM_Type' to 'uint32_t {aka long unsigned int}' [-fpermissive]define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE)
/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:75:22: note: in expansion of macro 'NRF_PDM' nrf_pdm_int_enable(NRF_PDM, NRF_PDM_INT_STARTED | NRF_PDM_INT_STOPPED); ^
~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:75:72: error: too many arguments to function 'void nrf_pdm_int_enable(uint32_t)' nrf_pdm_int_enable(NRF_PDM, NRF_PDM_INT_STARTED | NRF_PDM_INT_STOPPED); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:195:22: note: declared here STATIC_INLINE void nrf_pdm_int_enable(uint32_t pdm_int_mask) ^~~~~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:89:25: error: too many arguments to function 'void nrf_pdm_enable()' nrf_pdm_enable(NRF_PDM); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:231:22: note: declared here STATIC_INLINE void nrf_pdm_enable(void) ^~~~~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:90:53: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:91:51: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_task_t' for argument '1' to 'void nrf_pdm_task_trigger(nrf_pdm_task_t)' nrf_pdm_task_trigger(NRF_PDM, NRF_PDM_TASK_START); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp: In member function 'virtual void NRF52840_ADC_Class::end()': /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:99:26: error: too many arguments to function 'void nrf_pdm_disable()' nrf_pdm_disable(NRF_PDM); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:240:22: note: declared here STATIC_INLINE void nrf_pdm_disable(void) ^~~~~~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:112:34: error: too many arguments to function 'void nrf_pdm_psel_disconnect()' nrf_pdm_psel_disconnect(NRF_PDM); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:320:22: note: declared here STATIC_INLINE void nrf_pdm_psel_disconnect() ^~~~~~~ In file included from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf.h:79:0, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/cmsis.h:21, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_SEEED_XIAO_NRF52840_SENSE/PinNames.h:22, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/variants/SEEED_XIAO_NRF52840_SENSE/pinmode_arduino.h:17, from /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/Arduino.h:26, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/base_mic.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.h:4, from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:1: /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp: In member function 'void NRF52840_ADC_Class::setGain(int)': /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2453:42: error: invalid conversion from 'NRF_PDM_Type*' to 'nrf_pdm_gain_t {aka unsigned char}' [-fpermissive]define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE)
/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:130:20: note: in expansion of macro 'NRF_PDM' nrf_pdm_gain_set(NRF_PDM, _gain, _gain); ^
~~ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:130:41: error: too many arguments to function 'void nrf_pdm_gain_set(nrf_pdm_gain_t, nrf_pdm_gain_t)' nrf_pdm_gain_set(NRF_PDM, _gain, _gain); ^ In file included from /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:4:0: /Users/mariusz/Library/Arduino15/packages/Seeeduino/hardware/mbed/2.9.2/cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/hal/nrf_pdm.h:335:22: note: declared here __STATIC_INLINE void nrf_pdm_gain_set(nrf_pdm_gain_t gain_l, nrf_pdm_gain_t gain_r) ^~~~/Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp: In function 'void PDM_IRQHandler_v()': /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:136:55: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'bool nrf_pdm_event_check(nrf_pdm_event_t)' if (nrf_pdm_event_check(NRF_PDM, NRF_PDM_EVENT_STARTED)) { ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:137:55: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:151:119: error: cannot convert 'NRF_PDM_Type' to 'uint32_t {aka long unsigned int}' for argument '1' to 'void nrf_pdm_buffer_set(uint32_t, uint32_t)' nrf_pdm_buffer_set(NRF_PDM, (uint32_t)(NRF52840_ADC_Class::buf_0_ptr), NRF52840_ADC_Class::_buf_size_ptr / 2); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:158:119: error: cannot convert 'NRF_PDM_Type' to 'uint32_t {aka long unsigned int}' for argument '1' to 'void nrf_pdm_buffer_set(uint32_t, uint32_t)' nrf_pdm_buffer_set(NRF_PDM, (uint32_t)(NRF52840_ADC_Class::buf_1_ptr), NRF52840_ADC_Class::_buf_size_ptr / 2); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:173:64: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'bool nrf_pdm_event_check(nrf_pdm_event_t)' } else if (nrf_pdm_event_check(NRF_PDM, NRF_PDM_EVENT_STOPPED)) { ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:174:55: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STOPPED); ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:175:60: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'bool nrf_pdm_event_check(nrf_pdm_event_t)' } else if (nrf_pdm_event_check(NRF_PDM, NRF_PDM_EVENT_END)) { ^ /Users/mariusz/Documents/Arduino/libraries/Seeed_Arduino_Mic/src/hardware/nrf52840_adc.cpp:176:51: error: cannot convert 'NRF_PDM_Type' to 'nrf_pdm_event_t' for argument '1' to 'void nrf_pdm_event_clear(nrf_pdm_event_t)' nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_END); ^exit status 1
Compilation error: exit status 1