Quote Originally Posted by jofland View Post
According to the doc it should be 10000000. But if I read it from the DAC after booting with empty dac_controlset it shows 0x00.

Attachment 35362
Thanks! That seems to indicate that es8388.c is setting the DAC to slave mode. kheperV3 had to modify esp_app_main.c with this code

// GPIO0 => CLK_OUT1
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
WRITE_PERI_REG(PIN_CTRL, READ_PERI_REG(PIN_CTRL)& 0xFFFFFFF0);

to assign MCLK to GPIO0, allowing the ESP32 to supply the es8388 with MCLK (I hope I have this MASTER/SLAVE thing figured out).


Quote Originally Posted by jofland View Post
It writes into register ES8388_MASTERMODE = 0x08 the value from the configuration struct. The return value will be ORed to the last return value; 1 indicates an error.
Again, thanks. I'm an old COBOL programmer and am having trouble following this code.