mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
fix(ledc): clear ledc_mem_force_pd when LEDC peripheral is in use
And enable target test for C5 and P4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -35,7 +35,8 @@ extern "C" {
|
||||
*
|
||||
* @param enable Enable/Disable
|
||||
*/
|
||||
static inline void ledc_ll_enable_bus_clock(bool enable) {
|
||||
static inline void ledc_ll_enable_bus_clock(bool enable)
|
||||
{
|
||||
HP_SYS_CLKRST.soc_clk_ctrl3.reg_ledc_apb_clk_en = enable;
|
||||
}
|
||||
|
||||
@@ -46,7 +47,8 @@ static inline void ledc_ll_enable_bus_clock(bool enable) {
|
||||
/**
|
||||
* @brief Reset whole peripheral register to init value defined by HW design
|
||||
*/
|
||||
static inline void ledc_ll_enable_reset_reg(bool enable) {
|
||||
static inline void ledc_ll_enable_reset_reg(bool enable)
|
||||
{
|
||||
HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_ledc = enable;
|
||||
}
|
||||
|
||||
@@ -54,6 +56,14 @@ static inline void ledc_ll_enable_reset_reg(bool enable) {
|
||||
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
|
||||
#define ledc_ll_enable_reset_reg(...) (void)__DECLARE_RCC_ATOMIC_ENV; ledc_ll_enable_reset_reg(__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* @brief Enable the power for LEDC memory block
|
||||
*/
|
||||
static inline void ledc_ll_enable_mem_power(bool enable)
|
||||
{
|
||||
// No register to control the power for LEDC memory block on P4
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable LEDC function clock
|
||||
*
|
||||
@@ -62,7 +72,8 @@ static inline void ledc_ll_enable_reset_reg(bool enable) {
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static inline void ledc_ll_enable_clock(ledc_dev_t *hw, bool en) {
|
||||
static inline void ledc_ll_enable_clock(ledc_dev_t *hw, bool en)
|
||||
{
|
||||
(void)hw;
|
||||
HP_SYS_CLKRST.peri_clk_ctrl22.reg_ledc_clk_en = en;
|
||||
}
|
||||
|
Reference in New Issue
Block a user