Fixed interrupt latency when cache is disable on ESP32-C2

This commit is contained in:
zwl
2022-11-25 12:35:36 +08:00
parent 1732a6d044
commit 81d6b8f011
4 changed files with 13 additions and 7 deletions

View File

@@ -52,6 +52,8 @@
#include "esp_private/periph_ctrl.h"
#include "esp_sleep.h"
#include "soc/syscon_reg.h"
#include "soc/dport_access.h"
/* Macro definition
************************************************************************
*/
@@ -233,7 +235,8 @@ struct ext_funcs_t ext_funcs_ro = {
static void IRAM_ATTR esp_reset_rpa_moudle(void)
{
periph_module_reset(PERIPH_MODEM_RPA_MODULE);
DPORT_SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, BLE_RPA_REST_BIT);
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, BLE_RPA_REST_BIT);
}
static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2)
@@ -400,7 +403,7 @@ static int ble_hci_unregistered_hook(void*, void*)
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler, void *arg, void **ret_handle_in)
{
int rc = esp_intr_alloc(source, flags, handler, arg, (intr_handle_t *)ret_handle_in);
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler, arg, (intr_handle_t *)ret_handle_in);
return rc;
}