Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Spresense “audio_manager” assertion failed
-
I am working over a Spresense project but I have a problem with audio reproduction. The SD card has three files called "1.mp3", "2.mp3" and "3.mp3", but when I call one of them Serial puts an error and the board halts.
Other audio examples worked well also with the files actually used in my project (renamed)
void Play(int id){ // Open file placed on SD card if(id == 1){ Serial.println("Required file 1"); myFile = theSD.open("1.mp3"); } if(id == 2){ Serial.println("Required file 2"); myFile = theSD.open("2.mp3"); } if(id == 3){ Serial.println("Required file 3"); myFile = theSD.open("3.mp3"); } // Verify file open if (!myFile) { Serial.println("File open error"); } // Send first frames to be decoded err_t err = theAudio->writeFrames(AudioClass::Player0, myFile); if ((err != AUDIOLIB_ECODE_OK) && (err != AUDIOLIB_ECODE_FILEEND)) { Serial.println("File Read Error!"); myFile.close(); } theAudio->startPlayer(AudioClass::Player0); }
Required file 1 Attention: module[1] attention id[2]/code[1] (dma_controller/audio_dma_drv.cpp L886) Attention! up_assert: Assertion failed at file:manager/audio_manager.cpp line: 586 task: init up_dumpstate: sp: 0d08464c up_dumpstate: IRQ stack: up_dumpstate: base: 0d07b900 up_dumpstate: size: 00000800 up_dumpstate: used: 000000f8 up_dumpstate: User stack: up_dumpstate: base: 0d084898 up_dumpstate: size: 00001fec up_dumpstate: used: 00000518 up_stackdump: 0d084640: 0d03dc80 00000000 00000000 0d03dc80 00000000 0d0168ed 000fd080 000fda14 up_stackdump: 0d084660: 000fd040 0d01d715 0d0846e0 0d015af5 0d0846c0 000fd040 0001e000 00008000 up_stackdump: 0d084680: 0d03fdf8 0d03fdf8 00000000 0d000000 0d03dc80 0d0017a5 00004000 00004000 up_stackdump: 0d0846a0: 0d03fdf8 0d03fdc8 00000000 0d012071 00000000 0d03fdf8 00004000 0d001f93 up_stackdump: 0d0846c0: 022300f8 0d045500 00000001 0d001fdd 0d0455f8 00000000 0d03fdc8 0d03fc00 up_stackdump: 0d0846e0: 0d03fc00 0d000000 0d03dc80 0d03fc00 0d03fc00 0d000597 0d03fc00 0d00065f up_stackdump: 0d084700: 060107bc 00170000 0000020a 00010000 00000000 00000000 0f0dfdc2 3dbc48c1 up_stackdump: 0d084720: fd1b2fa3 bdbc5713 00000000 c0320000 00000000 00000000 bf800000 bf800000 up_stackdump: 0d084740: bf800000 bf800000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084760: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084780: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d0847a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d0847c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d0847e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084800: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084820: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084840: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 up_stackdump: 0d084860: 00000000 00000000 00000000 0d03dc90 0d03dc90 0d0032cd 0d01c23b 00000101 up_stackdump: 0d084880: 00000000 00000000 00000000 0d005cdb 00000000 00000000 deadbeef 0d0848a4 up_taskdump: Idle Task: PID=0 Stack Used=0 of 0 up_taskdump: hpwork: PID=1 Stack Used=584 of 2028 up_taskdump: lpwork: PID=2 Stack Used=352 of 2028 up_taskdump: lpwork: PID=3 Stack Used=352 of 2028 up_taskdump: lpwork: PID=4 Stack Used=352 of 2028 up_taskdump: init: PID=5 Stack Used=1304 of 8172 up_taskdump: cxd56_pm_task: PID=6 Stack Used=320 of 996 up_taskdump: <pthread>: PID=7 Stack Used=704 of 1020 up_taskdump: AMNG: PID=8 Stack Used=616 of 2028 up_taskdump: PLY_OBJ: PID=9 Stack Used=1088 of 3052 up_taskdump: SUB_PLY_OBJ: PID=10 Stack Used=324 of 3044 up_taskdump: OMIX_OBJ: PID=11 Stack Used=520 of 3044 up_taskdump: RENDER_CMP_DEV0: PID=12 Stack Used=696 of 2020 up_taskdump: RENDER_CMP_DEV1: PID=13 Stack Used=312 of 2020 up_taskdump: REC_OBJ: PID=14 Stack Used=352 of 2028 up_taskdump: CAPTURE_CMP_DEV0: PID=15 Stack Used=312 of 2012 up_taskdump: <pthread>: PID=16 Stack Used=344 of 2044
-
Hi @Vassily98 ,
I think this question was also asked on Stackoverflow, but I will also post a copy of my answer here.
If you try this and run into new problems, please let us know and we can continue to investigate.To analyze a stack dump the Spresense full SDK provide a tool where you can specify two files as arguments. One is your saved log file, and the other one is the system map file. Doing that you should be able to get the stack trace. If you have build your software with the Arduino IDE you should be able to find where your map file is located in the Arduino IDE log window. Go to File -> Preferences -> Settings -> Show verbose output during and select compilation and when you build your sketch you should be able to find where your build folder is. Normally this folder would be located in /tmp and look something like this:
/tmp/arduino_build_724727/
Fetch the full SDK from github:
git clone --recursive git@github.com:sonydevworld/spresense.git
Change directory to the SDK:
$cd spresense/sdk spresense/sdk$ ./tools/callstack.py -h Usage: python ./tools/callstack.py <System.map> <stackdump.log>
Now just specify the location of your files:
./tools/callstack.py /tmp/arduino_build_724727/output.map dump.log