Esp32 dual core usage

Greetings,

I have been trying to explore the dual core functionality of my ESP32 with some FFT led controller code that I have been working on.

I have tried to modify the example code found here to work on my applications:

Example:

I have not been successful and my processor continuously crashes and reboots when I try to run my code.

LED_CONTROLLER_DualCoreTest_V01_120521.ino (41.8 KB)

My code has three main components:

  1. Read analog mic input and perform FFT calculations
  2. OLED display with 3 button interface
  3. Output patterns to WS2812B LED strip using FASTLED

My intention was to move my two main FFT functions SampleMicInput() and CalculateFFT() to core 0 so core 1 can handle the UI and fastled functions as fast as possible and manage long LED strips. So far i have just moved the CalculateFFT functions but didn't want to confuse things more because it doesn't work....

I am a complete noob with ESP32 and I am not a great programmer in general so would love some help understanding how to utilize the second core of my ESP32. From the example I was hoping that simply moving the functions to the second core handler would work but it doesn't. I realize there must be dependencies but I don't know where to start looking or how to fix it.

Any help would be appreciated.

thanks in advance.