"Task watchdog got triggered" issue

4okoboko
Posts: 7
Joined: Wed Nov 16, 2022 7:54 am

"Task watchdog got triggered" issue

Postby 4okoboko » Thu Nov 17, 2022 6:57 am

Hello,

Continuing my steep learning curve about FreeRTOS running on ESP32 and following my previous issue described under the following post

https://esp32.com/viewtopic.php?f=2&t=30614

instead of using the ESP_LOGI() function for debug print inside a timer callback, I now try to set a flag variable inside the timer callback whenever the alarm event fires (as I have usually done with super loop programs before). Then, within the "app_main" task, I check the flag variable and if set, I clear it and then use the ESP_LOGI() function for debug print. The code seems to work, i.e. does not abort as before when using ESP_LOGI() inside the timer callback. However, the monitor log contains periodically the error: task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time. Compared to before, what I added as code was an endless while (1) loop inside the "app_main", so I assume that this loop somehow causes the watchdog problem, but again I don't really understand what is actually happening underneath. So, I have again several questions:
1. What is wrong with the code, i.e. how and why does the watchdog Task get triggered ?
2. If a watchdog really gets triggered, why does the CPU not get reset, but instead the program seems to continue from where it was before the watchdog issue is reported in the monitor log ?
3. How do I avoid the watchdog issue ?
4. What's the correct way to set a flag inside a timer callback, and then reset it inside a task and execute my logic thereafter, i.e. pass information between ISRs and tasks -- seems different from the super-loop case ?

The code is:

Code: Select all

/*
 * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: Unlicense OR CC0-1.0
 */



/****************************************************************************
*
* This file is for iBeacon demo. It supports both iBeacon sender and receiver
* which is distinguished by macros IBEACON_SENDER and IBEACON_RECEIVER,
*
* iBeacon is a trademark of Apple Inc. Before building devices which use iBeacon technology,
* visit https://developer.apple.com/ibeacon/ to obtain a license.
*
****************************************************************************/

#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>

#include "nvs_flash.h"

#include "esp_bt.h"
#include "esp_gap_ble_api.h"
#include "esp_gattc_api.h"
#include "esp_gatt_defs.h"
#include "esp_bt_main.h"
#include "esp_bt_defs.h"
#include "esp_ibeacon_api.h"

#include "esp_log.h"

#include "freertos/FreeRTOS.h"  // If you include FreeRTOS.h before task.h then portmacro.h will be included for you (do not include portmacro.h manually, just include FreeRTOS.h). However, if you fail to include FreeRTOS.h before tasks.h, then your code will not build

// #include "freertos/task.h"  // BaseType_t

#include "driver/gptimer.h"

static const char* PROGRAM_NAME = "iBeacon2Omnicomm" ;  // "iBeacons-ESP32-Tracker-Server" ;  // "IBEACON_DEMO";
extern esp_ble_ibeacon_vendor_t vendor_config;

///Declare static functions
static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param);

#if (IBEACON_MODE == IBEACON_RECEIVER)
static esp_ble_scan_params_t ble_scan_params = {
    .scan_type              = BLE_SCAN_TYPE_ACTIVE,
    .own_addr_type          = BLE_ADDR_TYPE_PUBLIC,
    .scan_filter_policy     = BLE_SCAN_FILTER_ALLOW_ALL,
    .scan_interval          = 0x50,     // 50 ms scan interval, i.e. start scanning for BLE devices every 50 ms elapsed
    .scan_window            = 0x30,     // 30 ms scan duration, i.e. whenever a scan interval starts, keep scanning for 30 ms
    .scan_duplicate         = BLE_SCAN_DUPLICATE_DISABLE
};

#elif (IBEACON_MODE == IBEACON_SENDER)
static esp_ble_adv_params_t ble_adv_params = {
    .adv_int_min        = 0x20,
    .adv_int_max        = 0x40,
    .adv_type           = ADV_TYPE_NONCONN_IND,
    .own_addr_type      = BLE_ADDR_TYPE_PUBLIC,
    .channel_map        = ADV_CHNL_ALL,
    .adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};
#endif


static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
    esp_err_t err;

    switch (event) {
    case ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT:{
#if (IBEACON_MODE == IBEACON_SENDER)
        esp_ble_gap_start_advertising(&ble_adv_params);
#endif
        break;
    }
    case ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT: {
#if (IBEACON_MODE == IBEACON_RECEIVER)
        //the unit of the duration is second, 0 means scan permanently
        uint32_t duration = 0;
        ESP_LOGI(PROGRAM_NAME, "starting a scan == calling esp_ble_gap_start_scanning()");
        esp_ble_gap_start_scanning(duration);
#endif
        break;
    }
    case ESP_GAP_BLE_SCAN_START_COMPLETE_EVT:
        //scan start complete event to indicate scan start successfully or failed
        if ((err = param->scan_start_cmpl.status) != ESP_BT_STATUS_SUCCESS) {
            ESP_LOGE(PROGRAM_NAME, "Scan start failed: %s", esp_err_to_name(err));
        } else {
            ESP_LOGI(PROGRAM_NAME, "Scan start successful");
        }
        break;
    case ESP_GAP_BLE_ADV_START_COMPLETE_EVT:
        //adv start complete event to indicate adv start successfully or failed
        if ((err = param->adv_start_cmpl.status) != ESP_BT_STATUS_SUCCESS) {
            ESP_LOGE(PROGRAM_NAME, "Adv start failed: %s", esp_err_to_name(err));
        }
        break;
    case ESP_GAP_BLE_SCAN_RESULT_EVT: {
        esp_ble_gap_cb_param_t *scan_result = (esp_ble_gap_cb_param_t *)param;  // make a local copy of the passed address of parameters
        switch (scan_result->scan_rst.search_evt) {
        case ESP_GAP_SEARCH_INQ_RES_EVT:
            /* Search for BLE iBeacon Packet */
            if (esp_ble_is_ibeacon_packet(scan_result->scan_rst.ble_adv, scan_result->scan_rst.adv_data_len)){
                esp_ble_ibeacon_t *ibeacon_data = (esp_ble_ibeacon_t*)(scan_result->scan_rst.ble_adv);
                
                // ESP_LOGI("iBeacon Found:");  // error: macro "ESP_LOGI" requires 3 arguments, but only 1 given
                ESP_LOGI(PROGRAM_NAME, "iBeacon Found ==========");
                
                esp_log_buffer_hex("MAC address:", scan_result->scan_rst.bda, ESP_BD_ADDR_LEN );
                
                esp_log_buffer_hex("UUID:", ibeacon_data->ibeacon_vendor.proximity_uuid, ESP_UUID_LEN_128);

                uint16_t major = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.major);
                uint16_t minor = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.minor);
                
                ESP_LOGI(PROGRAM_NAME, "Major: 0x%04x (%d)", major, major);
                ESP_LOGI(PROGRAM_NAME, "Minor: 0x%04x (%d)", minor, minor);
                
                //ESP_LOGI(PROGRAM_NAME, "Measured power (RSSI at a 1m distance):%d dbm", ibeacon_data->ibeacon_vendor.measured_power);
                
                ESP_LOGI(PROGRAM_NAME, "RSSI:%d dbm", scan_result->scan_rst.rssi);
            }
            break;
        default:
            break;
        }
        break;
    }

    case ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT:
        if ((err = param->scan_stop_cmpl.status) != ESP_BT_STATUS_SUCCESS){
            ESP_LOGE(PROGRAM_NAME, "Scan stop failed: %s", esp_err_to_name(err));
        }
        else {
            ESP_LOGI(PROGRAM_NAME, "Stop scan successfully");
        }
        break;

    case ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT:
        if ((err = param->adv_stop_cmpl.status) != ESP_BT_STATUS_SUCCESS){
            ESP_LOGE(PROGRAM_NAME, "Adv stop failed: %s", esp_err_to_name(err));
        }
        else {
            ESP_LOGI(PROGRAM_NAME, "Stop adv successfully");
        }
        break;

    default:
        break;
    }
}


void ble_ibeacon_appRegister(void)
{
    esp_err_t status;

    ESP_LOGI(PROGRAM_NAME, "registering callback == calling esp_ble_gap_register_callback()");

    //register the scan callback function to the gap module:
    if ((status = esp_ble_gap_register_callback(esp_gap_cb)) != ESP_OK) {
        ESP_LOGE(PROGRAM_NAME, "gap register error: %s", esp_err_to_name(status));
        return;
    } else {
        ESP_LOGI(PROGRAM_NAME, "successful");
    }

}

void ble_ibeacon_init(void)
{
    esp_bluedroid_init();
    esp_bluedroid_enable();
    ble_ibeacon_appRegister();
}

BaseType_t alarmFor1sec = pdFALSE;
// IRAM_ATTR: Forces code into IRAM instead of flash
static bool IRAM_ATTR timer_alarm_cb ( gptimer_handle_t timer, const gptimer_alarm_event_data_t * edata, void * user_data ) {    // == ISR on timer overflow event
    /*
    BaseType_t high_task_awoken = pdFALSE;
    QueueHandle_t queue = (QueueHandle_t) user_data;
    // Retrieve count value and send to queue
    example_queue_element_t ele = {
        .event_count = edata->count_value
    };
    xQueueSendFromISR(queue, &ele, &high_task_awoken);
    // return whether we need to yield at the end of ISR
    return (high_task_awoken == pdTRUE);
    */

    alarmFor1sec = pdTRUE ;    // #define pdTRUE ( ( BaseType_t ) 1 )  --> typedef portBASE_TYPE BaseType_t; --> #define portBASE_TYPE int

    // https://esp32.com/viewtopic.php?p=17131#p17131
    // It's not safe to printf() from an interrupt handler. By default printf() is line buffered, and it uses locking to ensure this is thread-safe (i.e. if multiple tasks all printf they appear on different lines instead of character soup.) But you can't lock in an ISR.
    //## ESP_LOGI(PROGRAM_NAME, "1 s elapsed");  // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/log.html#_CPPv413esp_log_write15esp_log_level_tPKcPKcz

    // @return Whether a high priority task has been waken up by this function:
    return pdFALSE ;
}
// if prototype declared as "static bool IRAM_ATTR ..." --> error: no return statement in function returning non-void [-Werror=return-type]


void app_main(void) {
    ESP_ERROR_CHECK(nvs_flash_init());

    ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));

    esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
    esp_bt_controller_init(&bt_cfg);
    esp_bt_controller_enable(ESP_BT_MODE_BLE);

    ble_ibeacon_init();

    /* set scan parameters */
#if (IBEACON_MODE == IBEACON_RECEIVER)
    ESP_LOGI(PROGRAM_NAME, "setting RECEIVER scan parameters == calling esp_ble_gap_set_scan_params()");
    esp_ble_gap_set_scan_params(&ble_scan_params);

#elif (IBEACON_MODE == IBEACON_SENDER)
    esp_ble_ibeacon_t ibeacon_adv_data;
    esp_err_t status = esp_ble_config_ibeacon_data (&vendor_config, &ibeacon_adv_data);
    if (status == ESP_OK){
        esp_ble_gap_config_adv_data_raw((uint8_t*)&ibeacon_adv_data, sizeof(ibeacon_adv_data));
    }
    else {
        ESP_LOGE(PROGRAM_NAME, "Config iBeacon data failed: %s\n", esp_err_to_name(status));
    }
#endif

    // Creating a GPTimer Handle with Resolution (frequency) of 1 MHz:
    ESP_LOGI(PROGRAM_NAME, "Creating new timer (handle)");
    gptimer_handle_t gptimer = NULL;
    gptimer_config_t timer_config = {
        .clk_src = GPTIMER_CLK_SRC_DEFAULT,
        .direction = GPTIMER_COUNT_UP,
        .resolution_hz = 1 * 1000 * 1000,   // 1MHz, 1 tick = 1us
    };
    ESP_ERROR_CHECK(gptimer_new_timer(&timer_config, &gptimer));
    
    // Prepare Triggering of Periodic Events (set up the alarm action before starting the timer !) every 1 sec:
    ESP_LOGI(PROGRAM_NAME, "Setting alarm action");

    gptimer_alarm_config_t alarm_config = {
        .reload_count = 0,                  // counter will reload with 0 on alarm event
        .alarm_count = 1000000,             // period = 1s @resolution 1MHz
        .flags.auto_reload_on_alarm = true, // enable auto-reload
    };
    ESP_ERROR_CHECK(gptimer_set_alarm_action(gptimer, &alarm_config));

    ESP_LOGI(PROGRAM_NAME, "Registering callback function to execute on alarm event");
    gptimer_event_callbacks_t cbs = {
        .on_alarm = timer_alarm_cb, // register user callback
    };
    ESP_ERROR_CHECK(gptimer_register_event_callbacks(gptimer, &cbs, NULL));

    ESP_ERROR_CHECK(gptimer_enable(gptimer));

    ESP_LOGI(PROGRAM_NAME, "Starting timer");
    ESP_ERROR_CHECK(gptimer_start(gptimer));

    while ( 1 ) {
        if ( alarmFor1sec ) {
            alarmFor1sec = pdFALSE ;
            ESP_LOGI(PROGRAM_NAME, "1 s elapsed ##########");
        }
    }
}
And an example monitor log is:

Code: Select all

--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3810,len:0x16ac
load:0x403c9700,len:0xbc8
load:0x403cc700,len:0x2d64
entry 0x403c98fc
I (25) boot: ESP-IDF v5.1-dev-1626-g4b6d9c8ad3 2nd stage bootloader
I (25) boot: compile time Nov 11 2022 16:57:52
I (25) boot: chip revision: V001
I (29) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (36) boot.esp32s3: Boot SPI Speed : 80MHz
I (41) boot.esp32s3: SPI Mode       : DIO
I (46) boot.esp32s3: SPI Flash Size : 2MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (74) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00100000
I (89) boot: End of partition table
I (93) boot_comm: chip revision: 1, min. application chip revision: 0
I (101) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=1e534h (124212) map
I (131) esp_image: segment 1: paddr=0002e55c vaddr=3fc96a00 size=01abch (  6844) load
I (133) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=75180h (479616) map
I (223) esp_image: segment 3: paddr=000a51a8 vaddr=3fc984bc size=02494h (  9364) load
I (225) esp_image: segment 4: paddr=000a7644 vaddr=40374000 size=12988h ( 76168) load
I (253) boot: Loaded app from partition at offset 0x10000
I (253) boot: Disabling RNG early entropy source...
I (265) cpu_start: Pro cpu up.
I (265) cpu_start: Starting app cpu, entry point is 0x403753c8
0x403753c8: call_start_cpu1 at /home/boko/esp/esp-idf/components/esp_system/port/cpu_start.c:146

I (0) cpu_start: App cpu up.
I (279) cpu_start: Pro cpu start user code
I (280) cpu_start: cpu freq: 160000000 Hz
I (280) cpu_start: Application information:
I (283) cpu_start: Project name:     ble_ibeacon_demo
I (288) cpu_start: App version:      1
I (293) cpu_start: Compile time:     Nov 11 2022 16:57:45
I (299) cpu_start: ELF file SHA256:  46e2daf040ff845c...
I (305) cpu_start: ESP-IDF:          v5.1-dev-1626-g4b6d9c8ad3
I (311) heap_init: Initializing. RAM available for dynamic allocation:
I (319) heap_init: At 3FC9E8F8 len 0004AE18 (299 KiB): D/IRAM
I (325) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (332) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (338) heap_init: At 600FE010 len 00001FF0 (7 KiB): RTCRAM
I (345) spi_flash: detected chip: generic
I (349) spi_flash: flash io: dio
W (353) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (366) coexist: coexist rom version e7ae62f
I (371) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (415) BT_INIT: BT controller compile version [76c24c9]
I (415) phy_init: phy_version 503,13653eb,Jun  1 2022,17:47:08
I (455) system_api: Base MAC address is not set
I (455) system_api: read default base MAC address from EFUSE
I (455) BT_INIT: Bluetooth MAC: 7c:df:a1:e3:55:fa

I (485) iBeacon2Omnicomm: registering callback == calling esp_ble_gap_register_callback()
I (485) iBeacon2Omnicomm: successful
I (485) iBeacon2Omnicomm: setting RECEIVER scan parameters == calling esp_ble_gap_set_scan_params()
I (495) iBeacon2Omnicomm: starting a scan == calling esp_ble_gap_start_scanning()
I (505) iBeacon2Omnicomm: Scan start successful
I (505) iBeacon2Omnicomm: Creating new timer (handle)
I (515) iBeacon2Omnicomm: Setting alarm action
I (515) iBeacon2Omnicomm: Registering callback function to execute on alarm event
I (525) iBeacon2Omnicomm: Starting timer
I (1535) iBeacon2Omnicomm: 1 s elapsed ##########
I (1715) iBeacon2Omnicomm: iBeacon Found ==========
I (1715) MAC address:: ac 23 3f a8 c3 a8 
I (1715) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (1725) iBeacon2Omnicomm: Major: 0x15a7 (5543)
I (1725) iBeacon2Omnicomm: Minor: 0x1de6 (7654)
I (1735) iBeacon2Omnicomm: RSSI:-50 dbm
I (1855) iBeacon2Omnicomm: iBeacon Found ==========
I (1855) MAC address:: ac 23 3f a8 c3 a8 
I (1855) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (1855) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (1865) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (1865) iBeacon2Omnicomm: RSSI:-42 dbm
I (2005) iBeacon2Omnicomm: iBeacon Found ==========
I (2005) MAC address:: c8 f2 25 b4 18 6e 
I (2005) UUID:: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 
I (2015) iBeacon2Omnicomm: Major: 0x0134 (308)
I (2015) iBeacon2Omnicomm: Minor: 0xda18 (55832)
I (2025) iBeacon2Omnicomm: RSSI:-51 dbm
I (2055) iBeacon2Omnicomm: iBeacon Found ==========
I (2055) MAC address:: ac 23 3f a8 c3 a8 
I (2055) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (2055) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (2065) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (2065) iBeacon2Omnicomm: RSSI:-36 dbm
I (2235) iBeacon2Omnicomm: iBeacon Found ==========
I (2235) MAC address:: ac 23 3f a8 c3 a8 
I (2235) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (2245) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (2245) iBeacon2Omnicomm: Minor: 0x1538 (5432)
I (2255) iBeacon2Omnicomm: RSSI:-60 dbm
I (2385) iBeacon2Omnicomm: iBeacon Found ==========
I (2385) MAC address:: c2 3a fd f2 10 be 
I (2385) UUID:: d4 07 03 39 6d a4 4e 50 a3 75 ba de 13 be 6d aa 
I (2385) iBeacon2Omnicomm: Major: 0x0034 (52)
I (2395) iBeacon2Omnicomm: Minor: 0x10be (4286)
I (2395) iBeacon2Omnicomm: RSSI:-80 dbm
I (2535) iBeacon2Omnicomm: 1 s elapsed ##########
I (3435) iBeacon2Omnicomm: iBeacon Found ==========
I (3435) MAC address:: ac 23 3f a8 c3 a8 
I (3435) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (3435) iBeacon2Omnicomm: Major: 0x15a7 (5543)
I (3445) iBeacon2Omnicomm: Minor: 0x1de6 (7654)
I (3445) iBeacon2Omnicomm: RSSI:-55 dbm
I (3535) iBeacon2Omnicomm: 1 s elapsed ##########
I (3725) iBeacon2Omnicomm: iBeacon Found ==========
I (3725) MAC address:: ac 23 3f a8 c3 a8 
I (3725) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (3735) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (3745) iBeacon2Omnicomm: Minor: 0x1538 (5432)
I (3745) iBeacon2Omnicomm: RSSI:-60 dbm
I (3875) iBeacon2Omnicomm: iBeacon Found ==========
I (3875) MAC address:: ac 23 3f a8 c3 a8 
I (3875) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (3885) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (3885) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (3895) iBeacon2Omnicomm: RSSI:-49 dbm
I (4065) iBeacon2Omnicomm: iBeacon Found ==========
I (4065) MAC address:: ac 23 3f a8 c3 a8 
I (4065) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (4065) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (4075) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (4075) iBeacon2Omnicomm: RSSI:-34 dbm
I (4285) iBeacon2Omnicomm: iBeacon Found ==========
I (4285) MAC address:: ac 23 3f a8 c3 a8 
I (4285) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (4285) iBeacon2Omnicomm: Major: 0x08ae (2222)
I (4295) iBeacon2Omnicomm: Minor: 0x08ae (2222)
I (4295) iBeacon2Omnicomm: RSSI:-39 dbm
I (4535) iBeacon2Omnicomm: 1 s elapsed ##########
I (5015) iBeacon2Omnicomm: iBeacon Found ==========
I (5015) MAC address:: c8 f2 25 b4 18 6e 
I (5015) UUID:: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 
I (5025) iBeacon2Omnicomm: Major: 0x0134 (308)
I (5025) iBeacon2Omnicomm: Minor: 0xda18 (55832)
I (5035) iBeacon2Omnicomm: RSSI:-52 dbm
I (5075) iBeacon2Omnicomm: iBeacon Found ==========
I (5075) MAC address:: ac 23 3f a8 c3 a8 
I (5075) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (5075) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (5085) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (5085) iBeacon2Omnicomm: RSSI:-40 dbm
I (5295) iBeacon2Omnicomm: iBeacon Found ==========
I (5295) MAC address:: ac 23 3f a8 c3 a8 
I (5295) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (5305) iBeacon2Omnicomm: Major: 0x08ae (2222)
I (5305) iBeacon2Omnicomm: Minor: 0x08ae (2222)
I (5315) iBeacon2Omnicomm: RSSI:-39 dbm
E (5405) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (5405) task_wdt:  - IDLE (CPU 0)
E (5405) task_wdt: Tasks currently running:
E (5405) task_wdt: CPU 0: main
E (5405) task_wdt: CPU 1: IDLE
E (5405) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x42052BEA:0x3FC97EF0 0x42052D96:0x3FC97F10 0x40377291:0x3FC97F30 0x42009B78:0x3FCF37F0 0x42074F4B:0x3FCF3880 0x4038194D:0x3FCF38B0
0x42052bea: task_wdt_timeout_handling at /home/boko/esp/esp-idf/components/esp_system/task_wdt/task_wdt.c:461 (discriminator 3)

0x42052d96: task_wdt_isr at /home/boko/esp/esp-idf/components/esp_system/task_wdt/task_wdt.c:585

0x40377291: _xt_lowint1 at /home/boko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:1118

0x42009b78: app_main at /home/boko/Desktop/ESP32/ble_ibeacon/main/ibeacon_demo.c:269 (discriminator 2)

0x42074f4b: main_task at /home/boko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/port_common.c:131 (discriminator 2)

0x4038194d: vPortTaskWrapper at /home/boko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:152


I (5535) iBeacon2Omnicomm: 1 s elapsed ##########
I (5905) iBeacon2Omnicomm: iBeacon Found ==========
I (5905) MAC address:: ac 23 3f a8 c3 a8 
I (5905) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (5915) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (5915) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (5925) iBeacon2Omnicomm: RSSI:-43 dbm
I (6225) iBeacon2Omnicomm: iBeacon Found ==========
I (6225) MAC address:: ac 23 3f a8 c3 a8 
I (6225) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (6225) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (6235) iBeacon2Omnicomm: Minor: 0x223d (8765)
I (6235) iBeacon2Omnicomm: RSSI:-40 dbm
I (6535) iBeacon2Omnicomm: 1 s elapsed ##########
I (6855) iBeacon2Omnicomm: iBeacon Found ==========
I (6855) MAC address:: ac 23 3f a8 c3 a8 
I (6855) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (6865) iBeacon2Omnicomm: Major: 0x15a7 (5543)
I (6865) iBeacon2Omnicomm: Minor: 0x1de6 (7654)
I (6875) iBeacon2Omnicomm: RSSI:-55 dbm
I (6915) iBeacon2Omnicomm: iBeacon Found ==========
I (6915) MAC address:: ac 23 3f a8 c3 a8 
I (6915) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (6925) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (6925) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (6935) iBeacon2Omnicomm: RSSI:-41 dbm
I (7095) iBeacon2Omnicomm: iBeacon Found ==========
I (7095) MAC address:: ac 23 3f a8 c3 a8 
I (7095) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (7095) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (7105) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (7105) iBeacon2Omnicomm: RSSI:-36 dbm
I (7535) iBeacon2Omnicomm: 1 s elapsed ##########
I (8105) iBeacon2Omnicomm: iBeacon Found ==========
I (8105) MAC address:: ac 23 3f a8 c3 a8 
I (8105) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (8105) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (8115) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (8115) iBeacon2Omnicomm: RSSI:-34 dbm
I (8235) iBeacon2Omnicomm: iBeacon Found ==========
I (8235) MAC address:: ac 23 3f a8 c3 a8 
I (8235) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (8235) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (8245) iBeacon2Omnicomm: Minor: 0x223d (8765)
I (8245) iBeacon2Omnicomm: RSSI:-38 dbm
I (8255) iBeacon2Omnicomm: iBeacon Found ==========
I (8255) MAC address:: ac 23 3f a8 c3 a8 
I (8265) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (8265) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (8275) iBeacon2Omnicomm: Minor: 0x1538 (5432)
I (8275) iBeacon2Omnicomm: RSSI:-55 dbm
I (8535) iBeacon2Omnicomm: 1 s elapsed ##########
I (8565) iBeacon2Omnicomm: iBeacon Found ==========
I (8565) MAC address:: ac 23 3f a8 c3 a8 
I (8565) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (8575) iBeacon2Omnicomm: Major: 0x15a7 (5543)
I (8585) iBeacon2Omnicomm: Minor: 0x1de6 (7654)
I (8585) iBeacon2Omnicomm: RSSI:-51 dbm
I (8935) iBeacon2Omnicomm: iBeacon Found ==========
I (8945) MAC address:: ac 23 3f a8 c3 a8 
I (8945) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (8945) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (8955) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (8955) iBeacon2Omnicomm: RSSI:-49 dbm
I (9535) iBeacon2Omnicomm: 1 s elapsed ##########
I (9955) iBeacon2Omnicomm: iBeacon Found ==========
I (9955) MAC address:: ac 23 3f a8 c3 a8 
I (9955) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (9955) iBeacon2Omnicomm: Major: 0x04d2 (1234)
I (9965) iBeacon2Omnicomm: Minor: 0x269e (9886)
I (9965) iBeacon2Omnicomm: RSSI:-49 dbm
I (10115) iBeacon2Omnicomm: iBeacon Found ==========
I (10115) MAC address:: ac 23 3f a8 c3 a8 
I (10115) UUID:: fd a5 06 93 a4 e2 4f b1 af cf c6 eb 07 64 78 25 
I (10125) iBeacon2Omnicomm: Major: 0x2711 (10001)
I (10125) iBeacon2Omnicomm: Minor: 0x4cb9 (19641)
I (10135) iBeacon2Omnicomm: RSSI:-41 dbm
I (10395) iBeacon2Omnicomm: iBeacon Found ==========
I (10395) MAC address:: c2 3a fd f2 10 be 
I (10395) UUID:: d4 07 03 39 6d a4 4E (10405) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (10405) task_wdt:  - IDLE (CPU 0)
E (10405) task_wdt: Tasks currently running:
E (10405) task_wdt: CPU 0: BTC_TASK
E (10405) task_wdt: CPU 1: IDLE
E (10405) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x42052BEA:0x3FC97EF0 0x42052D96:0x3FC97F10 0x40377291:0x3FC97F30 0x4200882A:0x3FCA0120 0x420096B3:0x3FCA0150 0x42008289:0x3FCA0170 0x42007E3E:0x3FCA0190 0x4205F35D:0x3FCA01B0 0x42069792:0x3FCA01D0 0x4206981E:0x3FCA01F0 0x4205EBF3:0x3FCA0220 0x42070417:0x3FCA0250 0x420683BE:0x3FCA0270 0x42068539:0x3FCA0580 0x42075185:0x3FCA05B0 0x40384545:0x3FCA05E0 0x42053642:0x3FCA0630 0x4200985E:0x3FCA06B0 0x4200C5A0:0x3FCA06E0 0x4202F40A:0x3FCA0700 0x4202F2D6:0x3FCA0720 0x4038194D:0x3FCA0750
0x42052bea: task_wdt_timeout_handling at /home/boko/esp/esp-idf/components/esp_system/task_wdt/task_wdt.c:461 (discriminator 3)

0x42052d96: task_wdt_isr at /home/boko/esp/esp-idf/components/esp_system/task_wdt/task_wdt.c:585

0x40377291: _xt_lowint1 at /home/boko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:1118

0x4200882a: uart_ll_get_txfifo_len at /home/boko/esp/esp-idf/components/hal/esp32s3/include/hal/uart_ll.h:301 (discriminator 1)
 (inlined by) uart_tx_char at /home/boko/esp/esp-idf/components/vfs/vfs_uart.c:156 (discriminator 1)

0x420096b3: uart_write at /home/boko/esp/esp-idf/components/vfs/vfs_uart.c:209

0x42008289: console_write at /home/boko/esp/esp-idf/components/vfs/vfs_console.c:73

0x42007e3e: esp_vfs_write at /home/boko/esp/esp-idf/components/vfs/vfs.c:436 (discriminator 4)

0x4205f35d: __swrite at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/stdio.c:94

0x42069792: __sflush_r at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/fflush.c:224

0x4206981e: _fflush_r at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/fflush.c:278

0x4205ebf3: __sfvwrite_r at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/fvwrite.c:251

0x42070417: __sprint_r at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/vfprintf.c:429
 (inlined by) __sprint_r at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/vfprintf.c:399

0x420683be: _vfprintf_r at ??:?

0x42068539: vprintf at /builds/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/vprintf.c:34 (discriminator 5)

0x42075185: esp_log_writev at /home/boko/esp/esp-idf/components/log/log.c:200

0x40384545: esp_log_write at /home/boko/esp/esp-idf/components/log/log.c:210

0x42053642: esp_log_buffer_hex_internal at /home/boko/esp/esp-idf/components/log/log_buffers.c:53 (discriminator 11)

0x4200985e: esp_gap_cb at /home/boko/Desktop/ESP32/ble_ibeacon/main/ibeacon_demo.c:117

0x4200c5a0: btc_gap_ble_cb_to_app at /home/boko/esp/esp-idf/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c:70
 (inlined by) btc_gap_ble_adv_pkt_handler at /home/boko/esp/esp-idf/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c:578

0x4202f40a: osi_thread_generic_event_handler at /home/boko/esp/esp-idf/components/bt/common/osi/thread.c:425

0x4202f2d6: osi_thread_run at /home/boko/esp/esp-idf/components/bt/common/osi/thread.c:165 (discriminator 1)

0x4038194d: vPortTaskWrapper at /home/boko/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:152


e 50 a3 75 ba de 13 be 6d aa 
I (10485) iBeacon2Omnicomm: Major: 0x0034 (52)
I (10485) iBeacon2Omnicomm: Minor: 0x10be (4286)
I (10495) iBeacon2Omnicomm: RSSI:-80 dbm
I (10535) iBeacon2Omnicomm: 1 s elapsed ##########
I (10955) iBeacon2Omnicomm: iBeacon Found ==========


Who is online

Users browsing this forum: No registered users and 106 guests