nRF5340 Audio Dev Kit - Change Default I2S Pins

Hello,

I am developing a custom PCB for use with the nRF5340 and would like to change the default pin values of the I2S module on my nRF5340 Audio DK first in order to validate. I would like to start by moving BCLK to P0.19. 

Can you please help me understand how to do so?

Thank you!

Best,

Louie

  • I was able to reprogram the pins with the following code:

    &pinctrl {
        i2s0_default {
    	    group1 {
    	        psels = <NRF_PSEL(I2S_SCK_M, 1, 12)>, <NRF_PSEL(I2S_SDOUT, 0, 13)>, <NRF_PSEL(I2S_LRCK_M, 0, 16)>;
            };
            group2 {
                psels = <NRF_PSEL(I2S_SCK_M, 1, 12)>, <NRF_PSEL(I2S_SDOUT, 0, 13)>, <NRF_PSEL(I2S_LRCK_M, 0, 16)>;
            };
        };
    };

    Please note that I had to use macros like "I2S_SCK_M" rather than "NRF_FUN_I2S_SCK_M" as it is listed in all the available documentation and in the header file, since the NRF_PSEL function seems to prepend the first argument in its parenthesis with "NRF_FUN_", which was not apparent to me until many attempts later. 

    Please also note that the macro "I2S_SDOUT" maps to the functionality seen on the "DIN" pin on the nRF53 Audio Dev Kit, which is quite unintuitive. Personally, I believe that the pin label on the dev kit is mis-labeled.

    Also, please note that I needed to deliberately re-program any I2S pin I wanted to use, even if I wanted to use it on its default pin. Once I remapped one pin, all other I2S pins were no longer active. I also had to re-pin the I2S pins for both group1 and group2. Could you please explain why there are two groups and what the difference is between them?

    Thanks for all your help!

Related