M5Core2 + Bottom2 Example crashes
-
Hello, I am using the Example for Bottom2 with my Core2:
https://github.com/m5stack/M5-ProductExampleCodes/blob/master/Base/M5GO_BOTTOM2/M5GO_BOTTOM2.ino
But the Core2 crashes and restarts all 5 seconds. I would assume there is a bug with the Microphone initialization?! (Also the Speaker example is also missing in the code)
-
Hello @swiminthesky
hmm, the M5GO Bottom2 example works for me. However there was a similar report in this thread and @cpersoz had success using Adafruit_Neopixel instead of FastLED.
Thanks
Felix -
Hm.. thanks @felmue but I doubt that it is the library. Both LED library examples work fine.
Also
void microPhoneInit() { InitI2SSpakerOrMic(MODE_MIC); // <------------ xTaskCreatePinnedToCore(i2sMicroFFTtask, "microPhoneTask", 4096, NULL, 3, NULL, 0); // <----------- }
The crashes stop when I exclude this line. Also the LEDs work fine then.
The mic/fft also does not show any minimal sign of signal, also within the 5 seconds before reboot. Maybe the Mic of the Bottom2 is broken? Is there a simple way to check if it is alive?
-- Edit: I updated all libraries. After bit more testing, the line seems to be pretty robust when it comes to the crash. But I also tried to adapt this M5Stick microphone example (M5Core2.h instead of M5Stick.h, the pins ought to be the same) but without success and it leads to a similar line
xTaskCreate(mic_record_task, "mic_record_task", 2048, NULL, 1, NULL);
Btw. my Core2s are not flashed to have a lot of memory and maybe the queues are reaching the heap (as f.i. mentioned here). I used
uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL );
and I get number of 6100.---Edit2: I tried this recording example, which is not parallelized by xTaskCreate, and it does not crash. Unfortunately I don't see any results after pressing 'record', it only starts to vibrate after 1-2 sec. and my other Core2 also makes a slight click&rumble sound. Shall I use VSCode+PlatformIO to debug?
--Edit3: I tried to patch tha partition / psram via this guide, I am not totally sure if it worked. And the record.ino. It doesn't crash, but the mic also only does the click/rumble after pressing record for 1.5s as before. Very strange..
-
Hello @swiminthesky
Re: Edit2: you'll need to press and hold BtnA to record something. The recording starts after the vibration and ends when BtnA is released (or after a certain amount of data has been recorded).
if (data_offset == 1024 * 100 || M5.Touch.ispressed() != true) break;
Thanks
Felix -
Yes it seems the microphone on the M5Core2 with Bottom 2 still does not work.
I have tried basic record and replay using UIFlow Blocky and the Core2 crashes and restarts. Its frustrating that such basic functions do not work and aren't fixed in updates.