2021-10-22 23:32:36 +03:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
2021-02-20 20:39:55 +08:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
#include "soc/dport_reg.h"
|
2021-10-22 23:32:36 +03:00
|
|
|
#include "soc/tracemem_config.h"
|
2021-02-20 20:39:55 +08:00
|
|
|
|
2023-07-05 17:33:32 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-10-22 23:32:36 +03:00
|
|
|
static inline void trace_ll_set_mem_block(int cpu, int block)
|
2021-02-20 20:39:55 +08:00
|
|
|
{
|
2021-10-22 23:32:36 +03:00
|
|
|
uint32_t block_bits = 0;
|
|
|
|
|
|
|
|
|
|
if (cpu == 0) {
|
|
|
|
|
block_bits = TRACEMEM_CORE0_MUX_BLK_BITS(block);
|
|
|
|
|
} else {
|
|
|
|
|
block_bits = TRACEMEM_CORE1_MUX_BLK_BITS(block);
|
|
|
|
|
}
|
|
|
|
|
DPORT_SET_PERI_REG_MASK(SENSITIVE_INTERNAL_SRAM_USAGE_2_REG, block_bits);
|
2021-02-20 20:39:55 +08:00
|
|
|
}
|
2023-07-05 17:33:32 +08:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|