I suspect that this board is broken, because the same code works fine on the second board.
Now, I want to detect such state and reboot.
This is my ping code:
Code: Select all
esp_ping_config_t ping_config = ESP_PING_DEFAULT_CONFIG();
ping_config.target_addr = target_addr;
ping_config.count = 5; // Number of ping requests to send
esp_ping_callbacks_t cbs = {
.cb_args = NULL,
.on_ping_success = ping_results,
.on_ping_timeout = NULL,
.on_ping_end = NULL
};
esp_ping_handle_t ping;
esp_ping_new_session(&ping_config, &cbs, &ping);
esp_ping_start(ping);
vTaskDelay(pdMS_TO_TICKS(10000));
esp_ping_stop(ping);
esp_ping_delete_session(ping);
CPU and other peripherals are running without problems.
Has someone any idea how to detect such case or how to fix it ?