On the Play Music page (https://learn.adafruit.com/adafruit-mus ... play-music) for the Music Maker Feather 3357, there is a disclaimer that interrupt-driven playback does not work on ESP32 platforms. ALL platforms, i.e., even the newest V2 and S3 versions?
If someone (me) needs to play an mp3 and still allow Bluetooth events (from a phone app that will control the music player), is there a solution or work-around? Is there a signal to poll and refill the play buffer, or should I purchase an M0 BLE Feather instead?
Interrupts workaround ESP32 Feather and MP3 player?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Checkout this issue which is marked as closed and has been tested using ESP32 based boards.
https://github.com/adafruit/Adafruit_VS ... /issues/45Try updating to the 2.0.5 release of the ESP32 BSP:
https://github.com/espressif/arduino-esp32/releases
The addition of support for noInterrupt() and interrupt() fixed interrupt based playback on ESP32 in our testing using this library and the feather_player example.
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Thanks for the links. Actually, the whole thread about the issue is interesting as well. A few different solutions. However, I don't know how to do this: "Try updating to the 2.0.5 release of the ESP32 BSP:". I'm a weekend hobbyist, retired (but I was an electronics and software engineer -- so maybe I can follow). I use platformIO as my IDE. Will that make a difference?
I did order an FR52832 BLE Feather arriving later this week. I thought it might be the simplest solution. Actually, if upgrading to 2.0.5 is simple enough, I'll do that. If I blow the ESP32 up, I'll have the 52832.
I did order an FR52832 BLE Feather arriving later this week. I thought it might be the simplest solution. Actually, if upgrading to 2.0.5 is simple enough, I'll do that. If I blow the ESP32 up, I'll have the 52832.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Updating the Board Support Package with the Arduino IDE only requires a few simple clicks. I recommend using the Arduino IDE to get going then working out what you will need to do with Platform IO to get the equivalent.
https://learn.adafruit.com/adafruit-esp ... -ide-setup
https://learn.adafruit.com/adafruit-esp ... -ide-setup
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Ok. I'll get the latest IDE and do the update. Gosh only knows how to do this in PlatformIO. But... it's been soooo long since I used the Arduino IDE.
Thanks.
Thanks.
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
I did a complete pkg and core update on PlatformIO first. Crash and burn. Panic message from the ESP32 after I re-enabled interrupts.
The 2.0.3 Arduino IDE is the only one *easily* available. It complains about an unknown architecture even though I installed the ESP32 Feather. It's looking more and more like a job for the nRF52832 after all. No fingers crossed.
I'll still plug away with the Arduino IDE, but family members keep asking, "Where's Dad?".
The 2.0.3 Arduino IDE is the only one *easily* available. It complains about an unknown architecture even though I installed the ESP32 Feather. It's looking more and more like a job for the nRF52832 after all. No fingers crossed.
I'll still plug away with the Arduino IDE, but family members keep asking, "Where's Dad?".
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
You can scroll down for the legacy Arduino IDE 1.8.19 here which will make it easier to follow the Adafruit guide instructions which were based on it.
https://www.arduino.cc/en/software/
https://www.arduino.cc/en/software/
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
I got 2.0.3 installed and updated. Nice interface compared to the old Arduino IDE. I like it.
Anyway, below are two screen grabs from the serial monitor. Self explanatory except the panic message on the interrupts-enabled attempt.
** Interrupts disabled **
Adafruit VS1053 Feather Test
VS1053 found
SD OK!
System Volume Information/
WPSettings.dat 12
IndexerVolumeGuid 76
track002.mp3 672767
track_001_blues.mp3 3141827
Playing full track 001
** Interrupts enabled **
Adafruit VS1053 Feather Test
VS1053 found
SD OK!
System Volume Information/
WPSettings.dat 12
IndexerVolumeGuid 76
track002.mp3 672767
track_001_blues.mp3 3141827
Playing full track 001
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception).
Debug exception reason: Stack canary watchpoint triggered ()
???
Anyway, below are two screen grabs from the serial monitor. Self explanatory except the panic message on the interrupts-enabled attempt.
** Interrupts disabled **
Adafruit VS1053 Feather Test
VS1053 found
SD OK!
System Volume Information/
WPSettings.dat 12
IndexerVolumeGuid 76
track002.mp3 672767
track_001_blues.mp3 3141827
Playing full track 001
** Interrupts enabled **
Adafruit VS1053 Feather Test
VS1053 found
SD OK!
System Volume Information/
WPSettings.dat 12
IndexerVolumeGuid 76
track002.mp3 672767
track_001_blues.mp3 3141827
Playing full track 001
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception).
Debug exception reason: Stack canary watchpoint triggered ()
???
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Were you able to install v2.0.6 of the Espressif Board Support Package?
There is a built-in exception decoder on the Arduino IDE. It is not too complicated to use, but it will take you further down this rabbit hole. There are mostly graphical instructions here on how to use it (scroll down the page)
https://github.com/me-no-dev/EspExceptionDecoder
There is a built-in exception decoder on the Arduino IDE. It is not too complicated to use, but it will take you further down this rabbit hole. There are mostly graphical instructions here on how to use it (scroll down the page)
https://github.com/me-no-dev/EspExceptionDecoder
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
Yes, v2.0.6 installed in both Arduino 2.0.3 IDE and PlatformIO, although I did the build in the Arduino IDE per your suggestion. I suppose I need to figure this out because I have this nagging feeling that the nRF52832 will have a similar issue (even though there's no real reason to suspect this except for the fact that I'm a pessimist by trade ;-))
I really don't have good reason to use the ESP32 Feather other than I have a few in the garage in small boxes. It's a lot faster than the nRF52, but I'm hoping that the nRF52 can do what I want without producing jumpy playback. The playback has to be seamless, and when the track is over, it has to restart without a glitch either. I may be expecting too much, especially since I'm also listening for BLE messages all the while as well. I guess this project is more of a proof-of-concept. It may not be possible to do what I have in mind. I just thought it would be great if I had a playlist on my phone and I could select a backing track at-will and start it playing. Mind you, my looper pedal can do this, but the interface requires bending over to look at small buttons. The playlist is just numbers 1-99 and I need a small spreadsheet to tell me what I stored where. The BLE/phone app would be oh so more elegant. Plus I'd have bragging rights that I made it myself.
So, to make a long story a little shorter -- I'm going to wait until the nRF52 arrives. I think it's unnecessary to continue down the hole with the ESP32 at this point. However, I greatly appreciate your time and effort towards this dead end. At least I have the latest Arduino IDE installed, and honestly, it's a lot less complicated than PlatformIO (even though I've been developing IoT thingies with PIO for a couple of years now and I got to know and understand it).
I really don't have good reason to use the ESP32 Feather other than I have a few in the garage in small boxes. It's a lot faster than the nRF52, but I'm hoping that the nRF52 can do what I want without producing jumpy playback. The playback has to be seamless, and when the track is over, it has to restart without a glitch either. I may be expecting too much, especially since I'm also listening for BLE messages all the while as well. I guess this project is more of a proof-of-concept. It may not be possible to do what I have in mind. I just thought it would be great if I had a playlist on my phone and I could select a backing track at-will and start it playing. Mind you, my looper pedal can do this, but the interface requires bending over to look at small buttons. The playlist is just numbers 1-99 and I need a small spreadsheet to tell me what I stored where. The BLE/phone app would be oh so more elegant. Plus I'd have bragging rights that I made it myself.
So, to make a long story a little shorter -- I'm going to wait until the nRF52 arrives. I think it's unnecessary to continue down the hole with the ESP32 at this point. However, I greatly appreciate your time and effort towards this dead end. At least I have the latest Arduino IDE installed, and honestly, it's a lot less complicated than PlatformIO (even though I've been developing IoT thingies with PIO for a couple of years now and I got to know and understand it).
- lmolter
- Posts: 61
- Joined: Wed Jan 01, 2014 1:29 pm
Re: Interrupts workaround ESP32 Feather and MP3 player?
One last observation: I searched for all posts regarding the nRF52832, and low and behold, another respondent was having trouble using the Music Maker Feather with (this time) the nRF52832 feather. And you tried to help him/them as well. I think there is something inherently wrong with either the Music Maker feather or the VS1053 library. I also wonder how many users have had complete success getting the feather_player running with a minimal of hair-pulling? Maybe a better question is why do most folks have success and a few have a brick? I'm not getting a warm and fuzzy about this. The nRF52 comes tomorrow, and after I solder the headers on, I'll upload the sketch. It already compiled with no errors, so the acid test is the upload and the running of the code. I'm cautiously optimistic.
Please be positive and constructive with your questions and comments.