2016-10-27 04:07:47 -04:00
|
|
|
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2016-10-26 09:09:55 -04:00
|
|
|
#ifndef __ESP_CROSSCORE_INT_H
|
|
|
|
#define __ESP_CROSSCORE_INT_H
|
|
|
|
|
|
|
|
|
2016-10-27 04:07:47 -04: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 04:50:28 -04: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 04:07:47 -04:00
|
|
|
*/
|
2016-10-26 09:09:55 -04:00
|
|
|
void esp_crosscore_int_init();
|
2016-10-27 04:07:47 -04: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 04:50:28 -04:00
|
|
|
* This is used internally by FreeRTOS in multicore mode
|
|
|
|
* and should not be called by the user.
|
|
|
|
*
|
2017-08-21 10:29:08 -04:00
|
|
|
* @param core_id Core that should do the yielding
|
2016-10-27 04:07:47 -04:00
|
|
|
*/
|
2017-08-21 10:29:08 -04:00
|
|
|
void esp_crosscore_int_send_yield(int core_id);
|
2016-10-26 09:09:55 -04:00
|
|
|
|
2017-08-21 10:29:08 -04: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);
|
|
|
|
|
2020-03-27 05:58:12 -04:00
|
|
|
/**
|
|
|
|
* Send an interrupt to a CPU indicating it should print its current backtrace
|
|
|
|
*
|
|
|
|
* This is use internally by the Task Watchdog to dump the backtrace of the
|
|
|
|
* opposite core and should not be called from application code.
|
|
|
|
*
|
|
|
|
* @param core_id Core that should print its backtrace
|
|
|
|
*/
|
|
|
|
void esp_crosscore_int_send_print_backtrace(int core_id);
|
|
|
|
|
2017-08-21 10:29:08 -04:00
|
|
|
#endif
|