Config and Pinout

Hi, I'm using a WisBlock setup with:
• RAK19001 base board
• RAK4631 core
RAK18030 microphone in IO slot A
• RAK15002 microSD in IO slot B
I'm running Zephyr / nRF Connect SDK v3.2.4 on nRF52840.
The SD card works and WAV files are written correctly. The PDM driver also initializes and captures buffers successfully. However, the captured microphone data is not real audio. The raw blocks show a large startup transient, then an exponential decay, and then all samples become a constant value (around 7). Speaking or playing a tone directly into the microphone does not change the captured pattern.
We have already tested multiple PDM pin combinations in the Zephyr overlay, different channel selections, and also tried another microphone module. The behavior stays the same.
Could you please confirm the correct routing / pinapping / enable requirements for using RAK18030 on RAK19001 with RAK4631, specifically with RAK152 also installed in the other IO slot?

Parents
  • Hello, 

    You need to ensure that the pins you are using are correctly configured. I.e. that NFC are pins configured as GPIOS with &uicr { nfct-pins-as-gpios; }; in your board overlay if you are using them, or that the module have the pins accessible/routed to the base board. Other than that you should be able to choose pins freely. 

    May I ask if you are using some sample firmware for your application? I.e. the DMIC driver sample? Please note that the frequency settings need to be changed in main.c to reflect the frequencies the ones which the RAK18030 microphone supports. 

    It is also possible to share your overlay to get a second opinion on it from me (or community members), but please note that I am not familiar with the WisBlock system, so I would need some time to get to know it to provide proper feedback. 

    Best regards,

    Maria

  • Hi, thanks for swift answer, this is how our overlay looks like.: 

    / {
    aliaser
    disk0 = &sdhc0;
    };
    };
    /* Aktiver PDM */
    &pdm0 {
    status = "ok";
    pinctrl-0 = <&pdm0_standard>;
    pinctrl-navn = "standard";
    };
    /* Definer PDM-pinner */
    &pinctrl {
    pdm0_standard: pdm0_standard {
    gruppe1
    psels = <NRF_PSEL(PDM_CLK, 0, 20)>,
    <NRF_PSEL(PDM_DIN, 0, 19)>;
    };
    };
    };
    /* Aktiver SPI0 for SD-kort */
    &spi0 {
    status = "ok";
    kompatibel = "nordisk, nrf-spim";
    cs-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
    sdhc0: sdhc@0 {
    kompatibel = "zephyr, sdhc-spi-spor";
    reg = <0>;
    status = "ok";
    spi-maks-frekvens = <400000>;
    mmc
    kompatibel = "zephyr, sdmmc-disk";
    disknavn = "SD";
    status = "ok";
    };
    };
    };
  • That overlay looks like it gotten heavily maimed by AI translation. You MUST NOT translate overlay files - switch any information source to native english without any translation active.

  • Hi, sorry did not see that. But its my mailsystem that "helps". Here is the code from VSC.

    / {
        aliases {
            disk0 = &sdhc0;
        };
    };
    /* Enable PDM */
    &pdm0 {
        status = "okay";
        pinctrl-0 = <&pdm0_default>;
        pinctrl-names = "default";
    };
    /* Define PDM pins */
    &pinctrl {
        pdm0_default: pdm0_default {
            group1 {
                psels = <NRF_PSEL(PDM_CLK, 0, 20)>,
                        <NRF_PSEL(PDM_DIN, 0, 19)>;
            };
        };
    };
    /* Enable SPI0 for SD card */
    &spi0 {
        status = "okay";
        compatible = "nordic,nrf-spim";
        cs-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
        sdhc0: sdhc@0 {
            compatible = "zephyr,sdhc-spi-slot";
            reg = <0>;
            status = "okay";
            spi-max-frequency = <400000>;
            mmc {
                compatible = "zephyr,sdmmc-disk";
                disk-name = "SD";
                status = "okay";
            };
        };
    };
  • Hello, 

    Thank you for your patience and for updating with the proper overlay file. 

    Pins P0.20 and P0.19 are configured to uart0 by default. Where do you disable uart0 or change its pin configuration? Potentially, choose other pins for PDM if you are using uart0. 

    If the pins are not the issue, verifying the PDM clock frequency is a good next step. 

    Best regards,

    Maria

  • Hi , thanks for feedback. We are disabling uart0 in main because we have found that we need to "shut down" PDM after recording before starting up SD to write the recording-data.(SPI sync) We did this successflly with RAK11720 and a analog mic but are struggling with the PDM and the SD on this kit. We are using DMIC.  Have not been focusing on the PDM clock so far. We got some test software from RAK which they claime worked on this kit but it failed. Do you have some test routines that we could use just to verify the setup of this kit?

  • Hi, thanks for feedback. We have now been able to use the mic and the SD card seperately but we are struggling to get them to be on the same SPI. We power down the PDM mic before turning the SD on and have ried several ways of setting timing between but it still seems to unstable. Do you have any hints or even test-software that can help us?  Thx Stein

Reply
  • Hi, thanks for feedback. We have now been able to use the mic and the SD card seperately but we are struggling to get them to be on the same SPI. We power down the PDM mic before turning the SD on and have ried several ways of setting timing between but it still seems to unstable. Do you have any hints or even test-software that can help us?  Thx Stein

Children
No Data
Related