mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
feat(l2mem): enable buffer mode for ahb burst access
This commit is contained in:
31
components/hal/esp32p4/include/hal/l2mem_ll.h
Normal file
31
components/hal/esp32p4/include/hal/l2mem_ll.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/hp_system_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enable the burst buffer for L2 memory
|
||||
*
|
||||
* @note During AHB burst access to the L2MEM, in order to reduce the AHB request to the L2MEM arbiter,
|
||||
* enabling the buffer mode can improve the performance.
|
||||
* @note This function must be called before any AHB burst access to the L2MEM.
|
||||
*/
|
||||
static inline void l2mem_ll_enable_ahb_burst_buffer(bool en_read, bool en_write)
|
||||
{
|
||||
HP_SYSTEM.l2_mem_ahb_buffer_ctrl.l2_mem_ahb_rdbuffer_en = en_read;
|
||||
HP_SYSTEM.l2_mem_ahb_buffer_ctrl.l2_mem_ahb_wrbuffer_en = en_write;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user