esp32, esp32s2: remove dependency of cache err int init on freertos
This commit is contained in:
parent
4d094eccca
commit
20d17e648b
|
@ -23,16 +23,22 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_intr_alloc.h"
|
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
|
||||||
|
#include "esp_intr_alloc.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
|
#include "hal/cpu_hal.h"
|
||||||
|
|
||||||
|
#include "esp32/dport_access.h"
|
||||||
|
#include "esp32/rom/ets_sys.h"
|
||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
void esp_cache_err_int_init(void)
|
void esp_cache_err_int_init(void)
|
||||||
{
|
{
|
||||||
uint32_t core_id = xPortGetCoreID();
|
uint32_t core_id = cpu_hal_get_core_id();
|
||||||
ESP_INTR_DISABLE(ETS_MEMACCESS_ERR_INUM);
|
ESP_INTR_DISABLE(ETS_MEMACCESS_ERR_INUM);
|
||||||
|
|
||||||
// We do not register a handler for the interrupt because it is interrupt
|
// We do not register a handler for the interrupt because it is interrupt
|
||||||
|
|
|
@ -33,12 +33,7 @@
|
||||||
#include "hal/wdt_hal.h"
|
#include "hal/wdt_hal.h"
|
||||||
#include "freertos/xtensa_api.h"
|
#include "freertos/xtensa_api.h"
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32
|
|
||||||
#include "esp32/cache_err_int.h"
|
#include "esp32/cache_err_int.h"
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
#include "esp32s2/cache_err_int.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* "inner" restart function for after RTOS, interrupts & anything else on this
|
/* "inner" restart function for after RTOS, interrupts & anything else on this
|
||||||
* core are already stopped. Stalls other core, resets hardware,
|
* core are already stopped. Stalls other core, resets hardware,
|
||||||
|
|
|
@ -23,19 +23,25 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_intr_alloc.h"
|
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
|
||||||
|
#include "esp_intr_alloc.h"
|
||||||
|
|
||||||
#include "soc/extmem_reg.h"
|
#include "soc/extmem_reg.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/periph_defs.h"
|
#include "soc/periph_defs.h"
|
||||||
#include "sdkconfig.h"
|
#include "hal/cpu_hal.h"
|
||||||
|
|
||||||
#include "esp32s2/dport_access.h"
|
#include "esp32s2/dport_access.h"
|
||||||
|
#include "esp32s2/rom/ets_sys.h"
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
void esp_cache_err_int_init(void)
|
void esp_cache_err_int_init(void)
|
||||||
{
|
{
|
||||||
uint32_t core_id = xPortGetCoreID();
|
uint32_t core_id = cpu_hal_get_core_id();
|
||||||
ESP_INTR_DISABLE(ETS_MEMACCESS_ERR_INUM);
|
ESP_INTR_DISABLE(ETS_MEMACCESS_ERR_INUM);
|
||||||
|
|
||||||
// We do not register a handler for the interrupt because it is interrupt
|
// We do not register a handler for the interrupt because it is interrupt
|
||||||
|
|
Loading…
Reference in a new issue