- Muchas notas - Fran Acién

20250206 - Puca and Faust

After iterating a bit, I was able to make it work. There are some things that changed, and other that are not in the documentation. Basically is:

The platform.ini looks like:

[env:pico32]
platform = espressif32
board = pico32
framework = arduino

; set cpu frequency - 80, 160 or 240MHz
board_build.f_cpu = 240000000L 

; Serial Monitor options
monitor_speed = 115200

board_build.partitions = default.csv

build_flags =
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
    -DCORE_DEBUG_LEVEL=5 
    ;-Wl,-Map,output.map

Then it is necessary to change the configuration around the pins of esp32audio like:

pin_config = {
	.bck_io_num = 23,
	.ws_io_num = 25,
	.data_out_num = 26,
	.data_in_num = 27
};

And it worked when I flashed the code directly generated from Faust.

My void setup looks something like:

void setup() {

  Serial.begin(115200);

  pinMode(21, INPUT);
  
  // Init audio codec
  WM8978 wm8978;
  wm8978.init();
  wm8978.addaCfg(1,1);
  wm8978.inputCfg(0,1,0);
  wm8978.outputCfg(1,0);
  wm8978.sampleRate(0); 
  wm8978.micGain(30);
  wm8978.auxGain(0);
  wm8978.lineinGain(30);
  wm8978.spkVolSet(50);
  wm8978.hpVolSet(30,30);
  wm8978.i2sCfg(2,0);  //format 12S, length 16bit

  wm8978.i2sCfg(2,0);
  

  DSP->start();