I'm implementing the SGTL5000 driver found on the github Nordic playground with the NRF52832. My custom board connects the NRF chip to SGTL5000. I've changed the drv_sgtl5000.h to match my boards layout:
/* I2S pin mapping */
#define DRV_SGTL5000_I2S_PIN_MCLK 21 /* 23 for nRF52832 DK, 1,13 for 52840 */
#define DRV_SGTL5000_I2S_PIN_BCLK 19 /* 20 for nRF52832 DK, 1,11 for 52840 */
#define DRV_SGTL5000_I2S_PIN_LRCLK 20 /* 22 for nRF52832 DK, 1,12 for 52840 */
#define DRV_SGTL5000_I2S_PIN_RX 18 /* 25 for nRF52832 DK, 1,15 for 52840 */
#define DRV_SGTL5000_I2S_PIN_TX 17 /* 24 for nRF52832 DK, 1,14 for 52840 */
I used the nReset pin for MCLK pin for no specific reason. When the driver tries to communicate via I2C with the SGTL it gets no ACK of address. After closer inspection, I've found that the MCLK pin is not getting clocked which is necessary for I2C to work. I measured the MCLK pin 21 with my multi-meter, and got 0 Hz. When measuring the frequency of the BCLK pin 19 I see 4 Mhz. It looks like MCLK is outputing on the BCLK pin for some reason. I've traced the pin configurating in the the sgtl driver code. The MCLK pin is definitely set to 21 all the way through to the I2S registers.
This issue may be related to https://devzone.nordicsemi.com/f/nordic-q-a/24609/i2s-with-reset-pin
Any advice on this issue would be greatly appreciated!