feat(etm): add core driver support for esp32-p4

esp_etm core driver support:
- channel allocator
- gpio etm sub driver
- gptimer etm sub driver
This commit is contained in:
morris
2023-08-15 18:43:19 +08:00
parent 3b50c716d8
commit 911c388cf8
11 changed files with 1468 additions and 3177 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -12,20 +12,34 @@
#include "hal/assert.h"
#include "hal/misc.h"
#include "soc/soc_etm_struct.h"
#include "soc/pcr_struct.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable the clock for ETM module
* @brief Enable the clock for ETM register
*
* @param hw ETM register base address
* @param group_id Group ID
* @param enable true to enable, false to disable
*/
static inline void etm_ll_enable_clock(soc_etm_dev_t *hw, bool enable)
static inline void etm_ll_enable_bus_clock(int group_id, bool enable)
{
hw->clk_en.clk_en = enable;
(void)group_id;
PCR.etm_conf.etm_clk_en = enable;
}
/**
* @brief Reset the ETM register
*
* @param group_id Group ID
*/
static inline void etm_ll_reset_register(int group_id)
{
(void)group_id;
PCR.etm_conf.etm_rst_en = 1;
PCR.etm_conf.etm_rst_en = 0;
}
/**