Spresense v.1.3.1における[Multicore MP]->[AudioFFT]動作時にSDカードを挿入しているとAssertにて停止してしまう
Spresenseのファームウェアバージョンv.1.3.1において、サンプルスケッチ[Multicore MP]->[AudioFFT]にある[MainAudio]をメインコア、[SubFFT]をサブコア1に書き込み、デジタルマイクを使用するように以下のように書き換え、
// 「変更前」
//theAudio->setRecorderMode(AS_SETRECDR_STS_INPUTDEVICE_MIC, 210);
// 「変更後」
theAudio->setRecorderMode(AS_SETRECDR_STS_INPUTDEVICE_MIC,-7700,SIMPLE_FIFO_BUF_SIZE,true);
また、コーデックディレクトリをSPI-FLASHに入れているので以下のように修正
// 「変更前」
//theAudio->initRecorder(AS_CODECTYPE_WAV, "/mnt/sd0/BIN", AS_SAMPLINGRATE_48000, channel);
// 「変更後」
theAudio->initRecorder(AS_CODECTYPE_WAV, "/mnt/spif/BIN", AS_SAMPLINGRATE_48000, channel);
デジタルマイクを接続時、シリアルモニタを立ち上げると、SDカードを挿入していない場合は問題なく動作しますが、SDカードが挿入されていると動作の途中で以下のようなAssertで動作が停止してしまいます。
16:57:17.367 -> Init Audio Library
16:57:17.367 -> Init Audio Recorder
16:57:17.569 -> Rec start!
16:57:17.603 -> 24000 23.460 0.000 0.000 0.000
16:57:17.603 -> 24000 23.460 0.000 0.000 0.000
16:57:17.637 -> 24000 23.460 0.000 0.000 0.000
16:57:17.671 -> 24000 23.460 0.000 0.000 0.000
16:57:17.671 -> 24000 23.460 0.000 0.000 0.000
16:57:17.705 -> 24000 23.460 0.000 0.000 0.000
16:57:17.739 -> 24000 23.460 0.000 0.000 0.000
16:57:17.739 -> 24000 23.460 0.000 0.000 0.000
16:57:17.739 -> 24000 23.460 0.000 0.000 0.000
16:57:17.807 -> 24000 23.460 0.000 0.000 0.000
16:57:17.807 -> 24000 23.460 0.000 0.000 0.000
16:57:17.840 -> 24000 23.460 0.000 0.000 0.000
16:57:17.840 -> 24000 23.460 0.000 0.000 0.000
16:57:17.873 -> 24000 23.460 0.000 0.000 0.000
16:57:17.907 -> 24000 23.460 0.000 0.000 0.000
16:57:17.907 -> 24000 23.460 0.000 0.000 0.000
16:57:17.941 -> 24000 23.460 0.000 0.000 0.000
16:57:17.941 -> 24000 23.460 0.000 0.000 0.000
16:57:17.975 -> 24000 23.460 0.000 0.000 0.000
16:57:17.975 -> 24000 23.460 0.000 0.000 0.000
16:57:18.009 -> 24000 23.460 0.000 0.000 0.000
16:57:18.043 -> 24000 23.460 0.000 0.000 0.000
16:57:18.077 -> 24000 23.460 0.000 0.000 0.000
16:57:18.077 -> 24000 23.460 0.000 0.000 0.000
16:57:18.112 -> 24000 23.460 0.000 0.000 0.000
16:57:18.145 -> 24000 23.460 0.000 0.000 0.000
16:57:18.145 -> 24000 23.460 0.000 0.000 0.000
16:57:18.179 -> 24000 23.460 0.000 0.000 0.000
16:57:18.179 -> 24000 23.460 0.000 0.000 0.000
16:57:18.212 -> 24000 23.460 0.000 0.000 0.000
16:57:18.245 -> 24000 23.460 0.000 0.000 0.000
16:57:18.245 -> 24000 23.460 0.000 0.000 0.000
16:57:18.279 -> 24000 23.460 0.000 0.000 0.000
16:57:18.313 -> 24000 23.460 0.000 0.000 0.000
16:57:18.313 -> 24000 23.460 0.000 0.000 0.000
16:57:18.347 -> 24000 23.460 0.000 0.000 0.000
16:57:18.381 -> 24000 23.460 0.000 0.000 0.000
16:57:18.381 -> 24000 23.460 0.000 0.000 0.000
16:57:18.381 -> 24000 23.460 0.000 0.000 0.000
16:57:18.448 -> 24000 23.460 0.000 0.000 0.000
16:57:18.448 -> 24000 23.460 0.000 0.000 0.000
16:57:18.482 -> 24000 23.460 0.000 0.000 0.000
16:57:18.482 -> 24000 23.460 0.000 0.000 0.000
16:57:18.515 -> 24000 23.460 0.000 0.000 0.000
16:57:18.515 -> 24000 23.460 0.000 0.000 0.000
16:57:18.549 -> 24000 23.460 0.000 0.000 0.000
16:57:18.582 -> 24000 140.460 0.000 0.000 0.000
16:57:18.854 -> Attention: module[1][0] attention id[2]/coup_assert: Assertion failed at file:objects/front_end/front_end_obj.cpp line: 119 task: FED_OBJ
16:57:18.854 -> up_dumpstate: sp: 0d05d614
16:57:18.854 -> up_dumpstate: IRQ stack:
16:57:18.854 -> up_dumpstate: bde[3] (dmup_assert: Assertion failed at file:objects/front_end/front_end_obj.cpp line: 89 task: CAPTURE_CMP_DEV0
16:57:18.854 -> up_dumpstate: sp: 0d05f5d4
16:57:18.854 -> up_dumpstate: IRQ stack:
16:57:18.887 -> up_dumpstate: base: 0d046f00
16:57:18.887 -> up_dumpstate: size: 00000800
16:57:18.887 -> up_dumpstate: used: 000000f0
16:57:18.887 -> up_dumpstate: User stack:
16:57:18.887 -> up_dumpstate: base: 0d05f728
16:57:18.887 -> up_dumpstate: size: 000007dc
16:57:18.887 -> up_dumpstate: used: 00000308
16:57:18.887 -> up_stackdump: 0d05f5c0: 0d05f5e4 0d00bf1f 00000000 000fd680 0d05f61c 0d05f6e0 00000000 0d014d89
16:57:18.887 -> up_stackdump: 0d05f5e0: 0d05f61c 000fd680 00006b00 00008000 0d05e710 0d05e720 0d014cff 0d00d7a1
16:57:18.921 -> up_stackdump: 0d05f600: 00000306 0d00c3e3 0d05f601 00000000 00000300 00000000 0d039700 00000301
16:57:18.921 -> up_stackdump: 0d05f620: 00000000 00000300 01000000 0d087800 0d087860 0d087d10 0d05e710 0d00ebc9
16:57:18.921 -> up_stackdump: 0d05f640: 6c6c6f72 612f7265 6f696475 61000000 0d0cf010 00700300 00000000 0d080000
16:57:18.921 -> up_stackdump: 0d05f660: 0d05e710 0d087860 0d05e710 0d05e710 0d05f6e0 0d00ec51 0d03974f 00000306
16:57:18.955 -> up_stackdump: 0d05f680: 0d05e710 0d00e457 00000000 0d00f0db 00000000 0d00d9a9 00000000 00000000
16:57:18.955 -> up_stackdump: 0d05f6a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
16:57:18.955 -> up_stackdump: 0d05f6c0: 00000000 0d0192eb 0d05e710 000fe5f0 0d05e710 00000006 00000000 0d00d5f7
16:57:18.955 -> up_stackdump: 0d05f6e0: ec5c6bc3 2b190000 c49faa0b 74d4bdb5 00000000 0d05e710 00000000 00000000
16:57:18.990 -> up_stackdump: 0d05f700: 00000000 0d00e0af 000fd380 000fe5f0 00000101 0d00e101 0d00e0df 0d001833
16:57:18.990 -> up_stackdump: 0d05f720: 00000000 00000000 deadbeef 0d05f734 00000000 54504143 5f455255 5f504d43
16:57:18.990 -> up_taskdump: Idle Task: PID=0 Stack Used=0 of 0
16:57:18.990 -> up_taskdump: hpwork: PID=1 Stack Used=584 of 2028
16:57:18.990 -> up_taskdump: lpwork: PID=2 Stack Used=352 of 2028
16:57:19.023 -> up_taskdump: lpwork: PID=3 Stack Used=352 of 2028
16:57:19.023 -> up_taskdump: lpwork: PID=4 Stack Used=352 of 2028
16:57:19.023 -> up_taskdump: init: PID=5 Stack Used=728 of 8172
16:57:19.023 -> up_taskdump: cxd56_pm_task: PID=6 Stack Used=320 of 996
16:57:19.023 -> up_taskdump: <pthread>: PID=7 Stack Used=320 of 1020
16:57:19.023 -> up_taskdump: AMNG: PID=8 Stack Used=648 of 2028
16:57:19.023 -> up_taskdump: PLY_OBJ: PID=9 Stack Used=320 of 3052
16:57:19.023 -> up_taskdump: SUB_PLY_OBJ: PID=10 Stack Used=320 of 3044
16:57:19.057 -> up_taskdump: OMIX_OBJ: PID=11 Stack Used=328 of 3044
16:57:19.057 -> up_taskdump: RENDER_CMP_DEV0: PID=12 Stack Used=312 of 2020
16:57:19.057 -> up_taskdump: RENDER_CMP_DEV1: PID=13 Stack Used=312 of 2020
16:57:19.057 -> up_taskdump: FED_OBJ: PID=14 Stack Used=760 of 2028
16:57:19.057 -> up_taskdump: REC_OBJ: PID=15 Stack Used=372 of 2028
16:57:19.057 -> up_taskdump: CAPTURE_CMP_DEV0: PID=16 Stack Used=856 of 2012
16:57:19.057 -> ase: 0d046f00
16:57:19.091 -> up_dumpstate: size: 00000800
16:57:19.091 -> up_dumpstate: used: 000000f0
16:57:19.091 -> up_dumpstate: User stack:
16:57:19.091 -> up_dumpstate: base: 0d05d758
16:57:19.091 -> up_dumpstate: size: 000007ec
16:57:19.091 -> up_dumpstate: used: 000002f8
16:57:19.091 -> up_stackdump: 0d05d600: 0d05d624 0d00bf1f 00000000 00000000 000000fc 00000001 00000000 0d014ea1
16:57:19.091 -> up_stackdump: 0d05d620: 00000015 000fd680 00006b02 00008000 0d05d650 0d087780 00000001 00000600
16:57:19.125 -> up_stackdump: 0d05d640: 0d05d790 0d02e0c9 0000000e 000ffc01 00000000 00000000 0004000d 00000300
16:57:19.125 -> up_stackdump: 0d05d660: 00000600 0d000100 00000001 00000000 0d05d790 0d0149ab 000ff084 0d00b76b
16:57:19.125 -> up_stackdump: 0d05d680: 0000000e 00000000 00000000 0004000d 00000300 00000600 00000100 00000000
16:57:19.125 -> up_stackdump: 0d05d6a0: 0d05d790 00000000 00000000 0d014cdd 0004000d 00000000 00000300 00000000
16:57:19.125 -> up_stackdump: 0d05d6c0: 00000000 00000001 0004000d 00000300 00000001 0d019200 000fd680 000fd680
16:57:19.159 -> up_stackdump: 0d05d6e0: 00000000 0d015a8b 0d05d790 000fd680 0d05d790 00000000 00000002 0d046378
16:57:19.159 -> up_stackdump: 0d05d700: 00000001 0000001a 00000000 0d015b67 00000000 00000000 00000000 001b011a
16:57:19.159 -> up_stackdump: 0d05d720: 0010000d 0000000d 00000000 00000010 00000000 00000000 00000000 00000000
16:57:19.159 -> up_stackdump: 0d05d740: 00000000 0d015bb5 00000101 0d001833 00000000 00000000 deadbeef 0d05d764
16:57:19.193 -> up_taskdump: Idle Task: PID=0 Stack Used=0 of 0
16:57:19.193 -> up_taskdump: hpwork: PID=1 Stack Used=584 of 2028
16:57:19.193 -> up_taskdump: lpwork: PID=2 Stack Used=352 of 2028
16:57:19.193 -> up_taskdump: lpwork: PID=3 Stack Used=352 of 2028
16:57:19.193 -> up_taskdump: lpwork: PID=4 Stack Used=352 of 2028
16:57:19.193 -> up_taskdump: init: PID=5 Stack Used=728 of 8172
16:57:19.193 -> up_taskdump: cxd56_pm_task: PID=6 Stack Used=320 of 996
16:57:19.227 -> up_taskdump: <pthread>: PID=7 Stack Used=320 of 1020
16:57:19.227 -> up_taskdump: AMNG: PID=8 Stack Used=648 of 2028
16:57:19.227 -> up_taskdump: PLY_OBJ: PID=9 Stack Used=320 of 3052
16:57:19.227 -> up_taskdump: SUB_PLY_OBJ: PID=10 Stack Used=320 of 3044
16:57:19.227 -> up_taskdump: OMIX_OBJ: PID=11 Stack Used=328 of 3044
16:57:19.227 -> up_taskdump: RENDER_CMP_DEV0: PID=12 Stack Used=312 of 2020
16:57:19.227 -> up_taskdump: RENDER_CMP_DEV1: PID=13 Stack Used=312 of 2020
16:57:19.261 -> up_taskdump: FED_OBJ: PID=14 Stack Used=840 of 2028
16:57:19.261 -> up_taskdump: REC_OBJ: PID=15 Stack Used=372 of 2028
16:57:19.261 -> a_controller/audio_dma_drv.cpp L898)
16:57:19.261 -> Attention: module[1][0] attention id[2]/code[7] (dma_controller/audio_dma_drv.cpp L774)
16:57:19.261 -> Attention!! Level 0x2 Code 0x3
16:57:19.261 -> Attention!! Level 0x2 Code 0x7
※上記はデジタルマイク1chのみ接続した場合です。2ch,4chの場合でも同様の事象が発生してしまいます。
環境は以下の通りです。
- Spresnse(拡張ボードに接続済み)・・・ファームウェアver.1.3.1(ブートローダ書き込み済)
- デジタルマイク・・・SPH0641LU4H-1
※使用製品URL:https://www.switch-science.com/catalog/3379/ - 挿入して上記のエラーが発生したSDカード
- Samsung製 EVO+ 128G
- Panasonic製 RP-SMSC08SW0 8G(SLC)
- Panasonic製 RP-SMTE64SWC 64G(MLC)
※上記何れもFAT32にてフォーマット済み。SDカード内には何もデータを入れていない状態です。(SDカードが正常に読み書きできることは確認済みです)
このサンプルスケッチにSDカードにアクセスする部分はSDカードをコーデックの場所にした時くらいなので、SDカード上にコーデックを置いてそこを読むようにしても変化なしです。
もし同様の事象になったとこがある方か原因等わかる方がいればご教授ください。