m5stack / Core2-for-AWS-IoT-Kit

Accompanying code for use with AWS IoT Kit content. Works with PlatformIO and ESP-IDF v4.2.
https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit
MIT License
127 stars 66 forks source link

Fix "Register I2S Interrupt error" for some devices when using example code #67

Closed xaos11 closed 3 years ago

xaos11 commented 3 years ago

When using the microphone and speaker example code, my unit would bootloop with the following errors (output from serial over USB):

␛[0;31mE (2852) I2S: Register I2S Interrupt error␛[0m Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

After some investigation I was able to determine that modifications to microphone.c and speaker.c resolve my issue. I suspect that as others start to get their devices, there may be some one-offs that have this same issue.

(.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 -> .intr_alloc_flags = ESP_INTR_FLAG_LEVEL2)

I guess something about my unit just doesn't like using the lowest interrupt level. Not sure what other consequences of these modifications are, but they fixed my boot loop issues.

xaos11 commented 3 years ago

Resolved with new example code.