Hi all,
Running into an issue with RAK18000 + Edge Impulse on RAK4631 and hoping someone has hit this before.
Setup
- RAK4631 + RAK19007 + RAK18000 v.C (in IO slot)
- Arduino IDE 2.3.8
- BSP: RAKwireless nRF Boards 1.3.3
- USB Stack: TinyUSB
Standalone PDM works
Following the RAK 18000 stereo mic example:
cpp
PDM.setPins(21, 4, -1);
PDM.setBufferSize(512);
PDM.onReceive(callback);
PDM.setGain(20);
PDM.begin(2, PCM_16000);
Result: ISR fires at 64 Hz, PDM.available() returns valid byte count, audio data captured (RMS varies with input).
Fails when Edge Impulse SDK linked
Same exact PDM init code, but with #include <my_project_inferencing.h> added:
- ISR still fires (now at 127 Hz, double rate)
PDM.available()returns 0 every callPDM.read()returns 0 bytes- Buffer never fills
What I’ve tried
- Multiple buffer sizes (512–4096)
- Different gain values
PDM.end()before re-init- Capture-then-classify pattern (avoiding continuous classifier)
- Both
run_classifier()andrun_classifier_continuous() - Bypassing
PDM.available()and reading fixed buffer size — still returns 0
Static buffer test confirms model works
Edge Impulse static_buffer example compiles and runs inference correctly on RAK4631 (5 ms inference, correct classification on test data). So the SDK + BSP base layer work — the issue is specifically live PDM capture when EI SDK is linked.
Diagnostic output
ISR/s:127 | Avail0:1263 Avail+:0 | LastSamples:0 | BufCount:0/16000
ISR firing, but PDM reports zero data available continuously.
Questions
- Has anyone successfully run RAK18000 + Edge Impulse on BSP 1.3.3?
- Is there a known interaction issue between BSP PDM library and Edge Impulse’s nRF52 porting layer?
- Is a newer BSP version available that addresses this? (Boards Manager only shows 1.3.3)
- Recommended path for audio classification on RAK4631 — should I be using nrfx_pdm directly, or external I2S mic?
Happy to share full diagnostic sketches if useful.
Thanks!