索尼Spresense“audio_manager”断言失败了

问题描述 投票:1回答:1

我正在研究一个Spresense项目,但我的音频再现有问题。 SD卡有三个名为“1.mp3”,“2.mp3”和“3.mp3”的文件,但是当我调用其中一个时,串行发出错误并且电路板停止。

其他音频示例也适用于我的项目中实际使用的文件(重命名)

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
audio sony spresense
1个回答
0
投票

要分析堆栈转储,Spresense完整SDK提供了一个工具,您可以在其中指定两个文件作为参数。一个是您保存的日志文件,另一个是系统映射文件。这样做你应该能够获得堆栈跟踪。如果您使用Arduino IDE构建软件,您应该能够在Arduino IDE日志窗口中找到您的地图文件所在的位置。转到文件 - >首选项 - >设置 - >显示详细输出并选择编译,在构建草图时,您应该能够找到构建文件夹的位置。通常这个文件夹位于/ tmp中,看起来像这样:

/tmp/arduino_build_724727/

从github获取完整的SDK:

git clone --recursive [email protected]:sonydevworld/spresense.git

将目录更改为SDK:

$cd spresense/sdk
spresense/sdk$ ./tools/callstack.py -h
Usage: python ./tools/callstack.py <System.map> <stackdump.log>

现在只需指定文件的位置:

./tools/callstack.py /tmp/arduino_build_724727/output.map stackoverflow.log

有关Spresense的具体问题和技术支持,请参阅:https://forum.developer.sony.com/

© www.soinside.com 2019 - 2024. All rights reserved.