ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

mnjhuy86
Posts: 26
Joined: Fri Jun 05, 2020 8:10 am

ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby mnjhuy86 » Mon Nov 01, 2021 1:04 pm

idf3.3.0
esp32-wrover
在蓝牙音乐插入过程中,出现这个错误。我的这个程序里面有播放SD卡音乐和播放FLASH音乐在里面。

Code: Select all

[0;32mI (95157) STAGEFRIGHTMP3_DECODER: MP3 opened[0m
[0;32mI (95177) MUSIC: Audio event 8 from flash mp3 element[0m
[0;32mI (95177) MUSIC: Audio event 9 from flash mp3 element[0m
[0;32mI (95177) MUSIC: [ * ] Received music info from mp3 decoder, sample_rates=44100, bits=16, ch=1[0m
[0;32mI (95187) MUSIC: [ * ] Received music info from flash mp3 decoder, sample_rates=44100, bits=16, ch=1[0m
[0;32mI (95197) RSP_FILTER: reset sample rate of source data : 44100, reset channel of source data : 1[0m
[0;32mI (95217) RSP_FILTER: sample rate of source data : 44100, channel of source data : 1, sample rate of destination data : 48000, channel of destination data : 2[0m
ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE) == bt_et_currentrxdescptr_currentrxdescptr_getf()), in ld_pscan.c at line 265
Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC      : 0x40089114  PS      : 0x00060434  A0      : 0x8003eeb0  A1      : 0x3ffbe5c0  
A2      : 0x00000001  A3      : 0x00000001  A4      : 0x00000000  A5      : 0x3ffbdce0  
A6      : 0x3ffb239e  A7      : 0x3ffc0544  A8      : 0x80089114  A9      : 0x3ffbe5a0  
A10     : 0x000000a2  A11     : 0x000000a2  A12     : 0x00000010  A13     : 0xffffffff  
A14     : 0x00000000  A15     : 0xfffffffc  SAR     : 0x
[2021-11-01 20:58:52.745]# RECV ASCII>
00000004  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x400890bd  LEND    : 0x400890c4  LCOUNT  : 0x00000000  
Core 0 was running in ISR context:
EPC1    : 0x40008155  EPC2    : 0x4000921a  EPC3    : 0x401291d9  EPC4    : 0x40089114

mnjhuy86
Posts: 26
Joined: Fri Jun 05, 2020 8:10 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby mnjhuy86 » Mon Nov 01, 2021 2:59 pm

ASSERT_ERR(0), in ld_fm.c at line 185
最近老是出现复位的问题啊。ASSERT_ERR(0), in ld_fm.c at line 185
这些都是些什么问题啊

Code: Select all

[0;32mI (78377) FATFS_STREAM: File size is 9381453 byte,pos:2052096[0m
[0;32mI (78397) MUSIC: Audio event 8 from sd mp3 element[0m
[0;32mI (78407) MUSIC: Audio event 9 from sd mp3 element[0m
[0;32mI (78407) MUSIC: [ * ] Received music info from mp3 decoder, sample_rates=44100, bits=16, ch=2[0m
[0;32mI (78407) MUSIC: [ * ] Received music info from sd mp3 decoder, sample_rates=44100, bits=16, ch=2[0m
[0;32mI (78417) RSP_FILTER: reset sample rate of source data : 44100, reset channel of source data : 2[0m
[0;32mI (78437) RSP_FILTER: sample rate of source data : 44100, channel of source data : 2, sample rate of destination data : 48000, channel of destination data : 2[0m
ASSERT_ERR(0), in ld_fm.c at line 185
Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC      : 0x4008918d  PS      : 0x00060834  A0      : 0x8003a828  A1      : 0x3ffbe620  
A2      : 0x00000001  A3      : 0x00000001  A4      : 0x00000000  A5      : 0x3ffbdce0  
A6      : 0x3ffb8d40  A7      : 0x00009fe7  A8      : 0x80089188  A9      : 0x3ffbe600  
A10     : 0x00000026  A11     : 0x00000026  A12     : 0x00000010  A13     : 0xffffffff  
A14     : 0x00000000  A15     : 0xfffffffc  SAR     : 0x00000004  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x40089131  LEND    : 0x40089138  LCOUNT  : 0x00000000  
Core 0 was running in ISR context:
EPC1    : 0x4008ab54  EPC2    : 0x401e920e  EPC3    : 0x401e920e  EPC4    : 0x4008918d

ESP_Eavo
Posts: 186
Joined: Tue Jun 08, 2021 6:23 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby ESP_Eavo » Tue Nov 02, 2021 12:16 am

您好,使用的是 ESP-ADF 吗?

mnjhuy86
Posts: 26
Joined: Fri Jun 05, 2020 8:10 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby mnjhuy86 » Tue Nov 02, 2021 12:23 am

是的

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby ESP_HengYC » Tue Nov 02, 2021 6:39 am

你好,

Code: Select all

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
这个 异常, 应该是有 while 中断阻塞了 freertos 的任务切换。

请把你的代码大致实现,可以发出来看一看和讨论下吗?

mnjhuy86
Posts: 26
Joined: Fri Jun 05, 2020 8:10 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby mnjhuy86 » Wed Nov 03, 2021 1:41 am

快速切换音频管道的会出现管道没有关闭。或者。管道没有启动。
但是切换完成后在SD卡音频播放过程是我就没有干涉音频的播放了。出现问题是在SD卡播放过程偶尔出现出现复位。
控制音频管道的播放。

Code: Select all

static void link_pipeline(int src) //连接新的音源通道
{
    if (media_src != src)
    {
        if (media_src) //原来有在其他音频管道,进行unlink
        {
            spots_marker(); //记录SD卡插播放状态
            ESP_ERROR_CHECK(audio_pipeline_terminate(pipeline));
            ESP_ERROR_CHECK(audio_pipeline_unlink(pipeline));
            switch (media_src)
            {
            case MEDIA_SRC_SD:
                ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, fatfs_stream_reader));
                ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, mp3_decoder));
                break;
            case MEDIA_SRC_FLASH:
                audio_hal_set_volume(board_handle->audio_hal, nvs_data->music_vol);
                audio_hal_set_volume(board_handle->woofer_hal, nvs_data->music_vol);
                ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, mp3_decoder));
                break;
            case MEDIA_SRC_A2DP:
                ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, bt_stream_reader));
                break;
            default:
                break;
            }
            ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, rsp_handle));
            ESP_ERROR_CHECK(audio_pipeline_unregister(pipeline, i2s_writer));
        }
        media_src = src; //
        if (media_src)   //有切换到其他音频通道
        {
            audio_pipeline_register(pipeline, rsp_handle, "filter");
            audio_pipeline_register(pipeline, i2s_writer, "i2s");
            switch (media_src)
            {
            case MEDIA_SRC_SD:
                ESP_LOGI(TAG, "[1.0] sd Register all elements to audio pipeline");
                ESP_ERROR_CHECK(audio_pipeline_register(pipeline, fatfs_stream_reader, "file"));
                ESP_ERROR_CHECK(audio_pipeline_register(pipeline, mp3_decoder, "sd mp3"));
                ESP_LOGI(TAG, "[2.0] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->raw");
                ESP_ERROR_CHECK(audio_pipeline_link(pipeline, (const char *[]){"file", "sd mp3", "filter", "i2s"}, 4));
                break;
            case MEDIA_SRC_FLASH:
                audio_hal_set_volume(board_handle->audio_hal, nvs_data->tones_vol);
                audio_hal_set_volume(board_handle->woofer_hal, nvs_data->tones_vol);
                ESP_ERROR_CHECK(audio_element_set_read_cb(mp3_decoder, mp3_music_read_cb, NULL));
                ESP_LOGI(TAG, "[1.0] flash Register all elements to audio pipeline");
                ESP_ERROR_CHECK(audio_pipeline_register(pipeline, mp3_decoder, "flash mp3"));

                ESP_LOGI(TAG, "[2.0] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->raw");
                ESP_ERROR_CHECK(audio_pipeline_link(pipeline, (const char *[]){"flash mp3", "filter", "i2s"}, 3));
                break;
            case MEDIA_SRC_A2DP:
                ESP_LOGI(TAG, "[1.0] bt Register all elements to audio pipeline");
                ESP_ERROR_CHECK(audio_pipeline_register(pipeline, bt_stream_reader, "bt"));
                ESP_LOGI(TAG, "[2.0] Link it together bt_stream_reader-->mp3_decoder-->raw");
                ESP_ERROR_CHECK(audio_pipeline_link(pipeline, (const char *[]){"bt", "filter", "i2s"}, 3));
                ESP_ERROR_CHECK(rsp_filter_set_src_info(rsp_handle, 44100, 2));
                break;
            default:
                ESP_ERROR_CHECK(ESP_FAIL);
                break;
            }
        }
    }
    else
    {
        if (src)
            stop_pipeline();
    }
    vTaskDelay(100 / portTICK_RATE_MS);
}

Code: Select all

void music_ctrl_task(void) //控制音频任务
{

    music_ctrl_cmd_t evt;
    while (1)
    {

        xQueueReceive(music_ctrl_evt_handle, &evt, portMAX_DELAY);
        switch (evt)
        {
        case AEL_USER_CMD_INSET_PLAY:
            spots_marker();              //记录SD卡插播放状态
            link_pipeline(MEDIA_SRC_SD); //
            audio_element_set_uri(fatfs_stream_reader, mp3_file_url);
            ESP_ERROR_CHECK(audio_pipeline_run(pipeline));
            ESP_ERROR_CHECK(audio_pipeline_wait_for_run(pipeline));

            inset_flg = 1;
            break;
        case AEL_USER_CMD_SD_PLAY:       //播放SD卡音频
            if(inset_flg == 0)//没有插播中
            {
                link_pipeline(MEDIA_SRC_SD); //
                audio_element_set_uri(fatfs_stream_reader, mp3_file_url);
                ESP_ERROR_CHECK(audio_pipeline_run(pipeline));
                ESP_ERROR_CHECK(audio_pipeline_wait_for_run(pipeline));
            }
            else //插播中
            {
                if (Spots_url)
                    free(Spots_url);
                Spots_url = strdup(mp3_file_url); //记录插播要恢复的音乐
                spots_pos = 0;
            }
            break;
        case AEL_USER_SPOTS_RESUME: //插播恢复
            if (audio_element_get_state(i2s_writer) == AEL_STATE_FINISHED)
            {
                link_pipeline(MEDIA_SRC_SD); //
                if (Spots_url)               //插播有恢复的点
                {
                    audio_element_info_t info; //插播记录插播放命令
                    audio_element_set_uri(fatfs_stream_reader, Spots_url);
                    if(spots_pos)
                    {
                        audio_element_getinfo(fatfs_stream_reader, &info);
                        info.byte_pos = spots_pos;
                        audio_element_setinfo(fatfs_stream_reader, &info); //
                    }
                }
                else
                {
                    audio_element_set_uri(fatfs_stream_reader, mp3_file_url);
                }
                ESP_ERROR_CHECK(audio_pipeline_run(pipeline));
                ESP_ERROR_CHECK(audio_pipeline_wait_for_run(pipeline));
                clean_spots_marker();
            }
            break;
        case AEL_USER_CMD_SD_STOP: //停止SD卡播放
            clean_spots_marker();
            if (media_src == MEDIA_SRC_SD)
            {
                stop_pipeline();
            }
            if (s_connection_state == ESP_A2D_CONNECTION_STATE_CONNECTED)
            {
                play_bt_sink_pepiline();
            }
            break;
        case AEL_USER_CMD_FLASH_PLAY:       //播放flash里面的音源
            link_pipeline(MEDIA_SRC_FLASH); //
            ESP_ERROR_CHECK(audio_pipeline_run(pipeline));
            ESP_ERROR_CHECK(audio_pipeline_wait_for_run(pipeline));
            break;
        case AEL_USER_CMD_BT_SW: //切换到蓝牙音源
            if (bt_stream_reader && (audio_element_get_state(i2s_writer) == AEL_STATE_FINISHED ||
                                     audio_element_get_state(i2s_writer) == AEL_STATE_INIT))
            {
                link_pipeline(MEDIA_SRC_A2DP); //
                ESP_ERROR_CHECK(audio_pipeline_run(pipeline));
                ESP_ERROR_CHECK(audio_pipeline_wait_for_run(pipeline));
                ESP_ERROR_CHECK(esp_a2d_media_ctrl(ESP_A2D_MEDIA_CTRL_START));
            }
            break;
        case AEL_USER_BT_DISABLE:            //蓝牙失能
            if (media_src == MEDIA_SRC_A2DP) //原来在蓝牙通道退出蓝牙通道
            {
                link_pipeline(MEDIA_SRC_NULL); //退出蓝牙通道
            }
            esp_bt_disable();
            break;
        case AEL_USER_BT_ENABLE: //蓝牙使能
            esp_bt_enable();
            break;
        case AEL_USER_CMD_VOLUP: //音量加
            nvs_data->music_vol += 10;
            if (nvs_data->music_vol > 100)
            {
                nvs_data->music_vol = 100;
            }
            if(media_src != MEDIA_SRC_FLASH)//不改变提示的音量
            {
                audio_hal_set_volume(board_handle->audio_hal, nvs_data->music_vol);
                audio_hal_set_volume(board_handle->woofer_hal, nvs_data->music_vol);
            }
            save_nvs_data();
            break;
        case AEL_USER_CMD_VOLDOWN: //音量减
            nvs_data->music_vol -= 10;
            if (nvs_data->music_vol < 0)
            {
                nvs_data->music_vol = 0;
            }

            if (media_src != MEDIA_SRC_FLASH)//不改变提示的音量
            {
                audio_hal_set_volume(board_handle->audio_hal, nvs_data->music_vol);
                audio_hal_set_volume(board_handle->woofer_hal, nvs_data->music_vol);
            }
            save_nvs_data();
            break;
        default:
            break;
        }
    }
}


mnjhuy86
Posts: 26
Joined: Fri Jun 05, 2020 8:10 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby mnjhuy86 » Wed Nov 03, 2021 2:44 am

又发现这个报错。这个蓝牙是连接的状态 。没有播放音乐

destination data : 2[0m
ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE) == bt_et_currentrxdescptr_currentrxdescptr_getf()), in ld_pscan.c at line 265
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC : 0x40089188 PS : 0x00060034 A0 : 0x8003eeb0 A1 : 0x3ffbe5c0
A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x3ffbdce0
A6 : 0x3ffb239e A7 : 0x00000001 A8 : 0x80089188 A9 : 0x3ffbe5a0
A10 : 0x000000a2 A11 : 0x000000a2 A12 : 0x00000010 A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x40089131 LEND : 0x40089138 LCOUNT : 0x00000000
Core 0 was running in ISR context:
EPC1 : 0x4008aa21 EPC2 : 0x401e9346 EPC3 : 0x40113ed9 EPC4 : 0x40089188

ELF file SHA256:

ESP_HengYC
Posts: 184
Joined: Fri Dec 15, 2017 2:45 am

Re: ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE)

Postby ESP_HengYC » Thu Nov 18, 2021 9:35 am

mnjhuy86 wrote:
Wed Nov 03, 2021 2:44 am
又发现这个报错。这个蓝牙是连接的状态 。没有播放音乐

destination data : 2[0m
ASSERT_ERR((EM_BT_RXDESC_OFFSET + ld_env.curr_rxdesc_index * REG_EM_BT_RXDESC_SIZE) == bt_et_currentrxdescptr_currentrxdescptr_getf()), in ld_pscan.c at line 265
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC : 0x40089188 PS : 0x00060034 A0 : 0x8003eeb0 A1 : 0x3ffbe5c0
A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x3ffbdce0
A6 : 0x3ffb239e A7 : 0x00000001 A8 : 0x80089188 A9 : 0x3ffbe5a0
A10 : 0x000000a2 A11 : 0x000000a2 A12 : 0x00000010 A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x40089131 LEND : 0x40089138 LCOUNT : 0x00000000
Core 0 was running in ISR context:
EPC1 : 0x4008aa21 EPC2 : 0x401e9346 EPC3 : 0x40113ed9 EPC4 : 0x40089188

ELF file SHA256:

这个错误是 (Interrupt wdt timeout on CPU0), 意思是有中断代码是阻塞或死循环, 阻塞了 freertos 的任务切换。 需要仔细排查。

Who is online

Users browsing this forum: No registered users and 18 guests