mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
change(esp_hw_support): optimize pmu_sleep RAM cost
(cherry picked from commit 3c2a0cb4f6)
This commit is contained in:
@@ -21,7 +21,13 @@ entries:
|
|||||||
rtc_sleep (noflash_text)
|
rtc_sleep (noflash_text)
|
||||||
rtc_time (noflash_text)
|
rtc_time (noflash_text)
|
||||||
if SOC_PMU_SUPPORTED = y && SOC_LIGHT_SLEEP_SUPPORTED = y:
|
if SOC_PMU_SUPPORTED = y && SOC_LIGHT_SLEEP_SUPPORTED = y:
|
||||||
pmu_sleep (noflash)
|
if SPIRAM_FLASH_LOAD_TO_PSRAM = y || PM_SLP_IRAM_OPT = y:
|
||||||
|
pmu_sleep (noflash)
|
||||||
|
else:
|
||||||
|
if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE != y:
|
||||||
|
pmu_sleep:pmu_sleep_start (noflash)
|
||||||
|
pmu_sleep:pmu_sleep_finish (noflash)
|
||||||
|
pmu_sleep:pmu_sleep_get_wakup_retention_cost (noflash)
|
||||||
sleep_mspi (noflash)
|
sleep_mspi (noflash)
|
||||||
if SPIRAM_FLASH_LOAD_TO_PSRAM = y:
|
if SPIRAM_FLASH_LOAD_TO_PSRAM = y:
|
||||||
pmu_init (noflash)
|
pmu_init (noflash)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void pmu_sleep_enable_regdma_backup(void)
|
|||||||
pmu_hal_hp_set_sleep_active_backup_enable(PMU_instance()->hal);
|
pmu_hal_hp_set_sleep_active_backup_enable(PMU_instance()->hal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pmu_sleep_disable_regdma_backup(void)
|
IRAM_ATTR void pmu_sleep_disable_regdma_backup(void)
|
||||||
{
|
{
|
||||||
assert(PMU_instance()->hal);
|
assert(PMU_instance()->hal);
|
||||||
pmu_hal_hp_set_sleep_active_backup_disable(PMU_instance()->hal);
|
pmu_hal_hp_set_sleep_active_backup_disable(PMU_instance()->hal);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/lp_aon_struct.h"
|
#include "soc/lp_aon_struct.h"
|
||||||
#include "hal/misc.h"
|
#include "hal/misc.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
#include "esp32c5/rom/rtc.h"
|
#include "esp32c5/rom/rtc.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ static inline uint32_t lp_aon_ll_ext1_get_wakeup_pins(void)
|
|||||||
* Set the flag to inform
|
* Set the flag to inform
|
||||||
* @param true: deepsleep false: lightsleep
|
* @param true: deepsleep false: lightsleep
|
||||||
*/
|
*/
|
||||||
static inline void lp_aon_ll_inform_wakeup_type(bool dslp)
|
FORCE_INLINE_ATTR void lp_aon_ll_inform_wakeup_type(bool dslp)
|
||||||
{
|
{
|
||||||
if (dslp) {
|
if (dslp) {
|
||||||
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/lp_aon_struct.h"
|
#include "soc/lp_aon_struct.h"
|
||||||
#include "hal/misc.h"
|
#include "hal/misc.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
#include "esp32c6/rom/rtc.h"
|
#include "esp32c6/rom/rtc.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ static inline uint32_t lp_aon_ll_ext1_get_wakeup_pins(void)
|
|||||||
* Set the flag to inform
|
* Set the flag to inform
|
||||||
* @param true: deepsleep false: lightsleep
|
* @param true: deepsleep false: lightsleep
|
||||||
*/
|
*/
|
||||||
static inline void lp_aon_ll_inform_wakeup_type(bool dslp)
|
FORCE_INLINE_ATTR void lp_aon_ll_inform_wakeup_type(bool dslp)
|
||||||
{
|
{
|
||||||
if (dslp) {
|
if (dslp) {
|
||||||
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/lp_aon_struct.h"
|
#include "soc/lp_aon_struct.h"
|
||||||
#include "hal/misc.h"
|
#include "hal/misc.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
#include "esp32c61/rom/rtc.h"
|
#include "esp32c61/rom/rtc.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ static inline uint32_t lp_aon_ll_ext1_get_wakeup_pins(void)
|
|||||||
* Set the flag to inform
|
* Set the flag to inform
|
||||||
* @param true: deepsleep false: lightsleep
|
* @param true: deepsleep false: lightsleep
|
||||||
*/
|
*/
|
||||||
static inline void lp_aon_ll_inform_wakeup_type(bool dslp)
|
FORCE_INLINE_ATTR void lp_aon_ll_inform_wakeup_type(bool dslp)
|
||||||
{
|
{
|
||||||
if (dslp) {
|
if (dslp) {
|
||||||
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/lp_aon_struct.h"
|
#include "soc/lp_aon_struct.h"
|
||||||
#include "hal/misc.h"
|
#include "hal/misc.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
#include "esp32h2/rom/rtc.h"
|
#include "esp32h2/rom/rtc.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ static inline uint32_t lp_aon_ll_ext1_get_wakeup_pins(void)
|
|||||||
* Set the flag to inform
|
* Set the flag to inform
|
||||||
* @param true: deepsleep false: lightsleep
|
* @param true: deepsleep false: lightsleep
|
||||||
*/
|
*/
|
||||||
static inline void lp_aon_ll_inform_wakeup_type(bool dslp)
|
FORCE_INLINE_ATTR void lp_aon_ll_inform_wakeup_type(bool dslp)
|
||||||
{
|
{
|
||||||
if (dslp) {
|
if (dslp) {
|
||||||
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
REG_SET_BIT(RTC_SLEEP_MODE_REG, BIT(0)); /* Tell rom to run deep sleep wake stub */
|
||||||
|
|||||||
Reference in New Issue
Block a user