fix(mspi): fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4

This commit is contained in:
Armando
2025-03-08 14:06:09 +08:00
committed by wuzhenghui
parent 3f69abdb7e
commit 419e8b2e20
10 changed files with 140 additions and 39 deletions
@@ -0,0 +1,36 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "sdkconfig.h"
#include "soc/rtc.h"
#ifdef __cplusplus
extern "C" {
#endif
#if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
/**
* @brief Sync MSPI speed mode before CPU frequency switching, only needed when frequency is decreasing.
*
* @param target_cpu_src_freq Target clock source frequency for CPU frequency switching
* @param target_cpu_freq CPU frequency switching target frequency
*/
void esp_clk_utils_mspi_speed_mode_sync_before_cpu_freq_switching(uint32_t target_cpu_src_freq, uint32_t target_cpu_freq);
/**
* @brief Sync MSPI speed mode after CPU frequency switching, only needed when frequency is upcreasing.
*
* @param target_cpu_src_freq Target clock source frequency for CPU frequency switching
* @param target_cpu_freq CPU frequency switching target frequency
*/
void esp_clk_utils_mspi_speed_mode_sync_after_cpu_freq_switching(uint32_t target_cpu_src_freq, uint32_t target_cpu_freq);
#endif
#ifdef __cplusplus
}
#endif