2021-11-06 09:24:45 +00:00
|
|
|
/*
|
2022-01-18 02:32:56 +00:00
|
|
|
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
2021-11-06 09:24:45 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2016-10-26 13:09:55 +00:00
|
|
|
#ifndef __ESP_CROSSCORE_INT_H
|
|
|
|
#define __ESP_CROSSCORE_INT_H
|
|
|
|
|
2021-02-23 12:06:41 +00:00
|
|
|
#include "sdkconfig.h"
|
|
|
|
|
2021-01-26 04:54:26 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2016-10-26 13:09:55 +00:00
|
|
|
|
2016-10-27 08:07:47 +00:00
|
|
|
/**
|
|
|
|
* Initialize the crosscore interrupt system for this CPU.
|
|
|
|
* This needs to be called once on every CPU that is used
|
|
|
|
* by FreeRTOS.
|
2016-10-27 08:50:28 +00:00
|
|
|
*
|
|
|
|
* If multicore FreeRTOS support is enabled, this will be
|
|
|
|
* called automatically by the startup code and should not
|
|
|
|
* be called manually.
|
2016-10-27 08:07:47 +00:00
|
|
|
*/
|
2019-07-16 09:33:30 +00:00
|
|
|
void esp_crosscore_int_init(void);
|
2016-10-27 08:07:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send an interrupt to a CPU indicating it should yield its
|
|
|
|
* currently running task in favour of a higher-priority task
|
|
|
|
* that presumably just woke up.
|
|
|
|
*
|
2016-10-27 08:50:28 +00:00
|
|
|
* This is used internally by FreeRTOS in multicore mode
|
|
|
|
* and should not be called by the user.
|
|
|
|
*
|
2017-08-21 14:29:08 +00:00
|
|
|
* @param core_id Core that should do the yielding
|
2016-10-27 08:07:47 +00:00
|
|
|
*/
|
2017-08-21 14:29:08 +00:00
|
|
|
void esp_crosscore_int_send_yield(int core_id);
|
2016-10-26 13:09:55 +00:00
|
|
|
|
2017-08-21 14:29:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send an interrupt to a CPU indicating it should update its
|
|
|
|
* CCOMPARE1 value due to a frequency switch.
|
|
|
|
*
|
|
|
|
* This is used internally when dynamic frequency switching is
|
|
|
|
* enabled, and should not be called from application code.
|
|
|
|
*
|
|
|
|
* @param core_id Core that should update its CCOMPARE1 value
|
|
|
|
*/
|
|
|
|
void esp_crosscore_int_send_freq_switch(int core_id);
|
|
|
|
|
2021-06-07 19:54:09 +00:00
|
|
|
void esp_crosscore_int_send_gdb_call(int core_id);
|
2021-02-23 12:06:41 +00:00
|
|
|
|
2022-01-18 02:32:56 +00:00
|
|
|
#if !CONFIG_IDF_TARGET_ESP32C3 && !CONFIG_IDF_TARGET_ESP32H2 && !CONFIG_IDF_TARGET_ESP32C2
|
2020-03-27 09:58:12 +00:00
|
|
|
/**
|
|
|
|
* Send an interrupt to a CPU indicating it should print its current backtrace
|
2020-11-10 07:40:01 +00:00
|
|
|
*
|
2020-03-27 09:58:12 +00:00
|
|
|
* This is use internally by the Task Watchdog to dump the backtrace of the
|
|
|
|
* opposite core and should not be called from application code.
|
2020-11-10 07:40:01 +00:00
|
|
|
*
|
2020-03-27 09:58:12 +00:00
|
|
|
* @param core_id Core that should print its backtrace
|
|
|
|
*/
|
|
|
|
void esp_crosscore_int_send_print_backtrace(int core_id);
|
2021-02-23 12:06:41 +00:00
|
|
|
#endif
|
2020-03-27 09:58:12 +00:00
|
|
|
|
2021-01-26 04:54:26 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-08-21 14:29:08 +00:00
|
|
|
#endif
|