xtensa/esp32s3: Support ESP32-S3 PM standby and sleep.

1. pm configuration demonstrates the use of power management present on the ESP32-S3.
   2. You can use the pmconfig command to test the power management, for details look at
      ``Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst``

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
chenwen@espressif.com
2024-03-27 16:25:14 +08:00
committed by Xiang Xiao
parent f4e31a6568
commit ea5583b112
12 changed files with 2144 additions and 127 deletions
@@ -325,6 +325,57 @@ To test it, just run the ``oneshot`` example::
Waiting...
Finished
pm
-------
This config demonstrate the use of power management present on the ESP32-S3.
You can use the pmconfig command to test the power management.
Enables PM support. You can define standby mode and sleep mode delay time::
$ make menuconfig
-> Board Selection
-> (15) PM_STANDBY delay (seconds)
(0) PM_STANDBY delay (nanoseconds)
(20) PM_SLEEP delay (seconds)
(0) PM_SLEEP delay (nanoseconds)
Before switching PM status, you need to query the current PM status::
nsh> pmconfig
Last state 0, Next state 0
/proc/pm/state0:
DOMAIN0 WAKE SLEEP TOTAL
normal 0s 00% 0s 00% 0s 00%
idle 0s 00% 0s 00% 0s 00%
standby 0s 00% 0s 00% 0s 00%
sleep 0s 00% 0s 00% 0s 00%
/proc/pm/wakelock0:
DOMAIN0 STATE COUNT TIME
system normal 2 1s
system idle 1 1s
system standby 1 1s
system sleep 1 1s
System switch to the PM idle mode, you need to enter::
nsh> pmconfig relax normal
nsh> pmconfig relax normal
System switch to the PM standby mode, you need to enter::
nsh> pmconfig relax idle
nsh> pmconfig relax normal
nsh> pmconfig relax normal
System switch to the PM sleep mode, you need to enter::
nsh> pmconfig relax standby
nsh> pmconfig relax idle
nsh> pmconfig relax normal
nsh> pmconfig relax normal
Note: when normal mode COUNT is 0, it will switch to the next PM state where COUNT is not 0.
psram_quad
----------
+7
View File
@@ -186,6 +186,13 @@ ifeq ($(CONFIG_ESP32S3_AES_ACCELERATOR),y)
CHIP_CSRCS += esp32s3_aes.c
endif
ifeq ($(CONFIG_PM),y)
ifneq ($(CONFIG_ARCH_CUSTOM_PMINIT),y)
CHIP_CSRCS += esp32s3_pminitialize.c
endif
CHIP_CSRCS += esp32s3_pm.c
endif
#############################################################################
# Espressif HAL for 3rd Party Platforms
#############################################################################
+125
View File
@@ -24,20 +24,141 @@
#include <nuttx/config.h>
#include <debug.h>
#include <arch/board/board.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/power/pm.h>
#include "xtensa.h"
#include "esp32s3_pm.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Values for the RTC Alarm to wake up from the PM_STANDBY mode
* (which corresponds to ESP32-C3 stop mode). If this alarm expires,
* the logic in this file will wakeup from PM_STANDBY mode and
* transition to PM_SLEEP mode (ESP32-C3 standby mode).
*/
#ifdef CONFIG_PM
#ifndef CONFIG_PM_ALARM_SEC
# define CONFIG_PM_ALARM_SEC 15
#endif
#ifndef CONFIG_PM_ALARM_NSEC
# define CONFIG_PM_ALARM_NSEC 0
#endif
#ifndef CONFIG_PM_SLEEP_WAKEUP_SEC
# define CONFIG_PM_SLEEP_WAKEUP_SEC 20
#endif
#ifndef CONFIG_PM_SLEEP_WAKEUP_NSEC
# define CONFIG_PM_SLEEP_WAKEUP_NSEC 0
#endif
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: up_idlepm
*
* Description:
* Perform IDLE state power management.
*
****************************************************************************/
#ifdef CONFIG_PM
static void up_idlepm(void)
{
irqstate_t flags;
static enum pm_state_e oldstate = PM_NORMAL;
enum pm_state_e newstate;
int ret;
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */
if (newstate != oldstate)
{
flags = spin_lock_irqsave(NULL);
/* Perform board-specific, state-dependent logic here */
_info("newstate= %d oldstate=%d\n", newstate, oldstate);
/* Then force the global state change */
ret = pm_changestate(PM_IDLE_DOMAIN, newstate);
if (ret < 0)
{
/* The new state change failed, revert to the preceding state */
pm_changestate(PM_IDLE_DOMAIN, oldstate);
}
else
{
/* Save the new state */
oldstate = newstate;
}
spin_unlock_irqrestore(NULL, flags);
/* MCU-specific power management logic */
switch (newstate)
{
case PM_NORMAL:
break;
case PM_IDLE:
break;
case PM_STANDBY:
{
/* Enter Force-sleep mode */
esp32s3_pmstandby(CONFIG_PM_ALARM_SEC * 1000000 +
CONFIG_PM_ALARM_NSEC / 1000);
}
break;
case PM_SLEEP:
{
/* Enter Deep-sleep mode */
esp32s3_pmsleep(CONFIG_PM_SLEEP_WAKEUP_SEC * 1000000 +
CONFIG_PM_SLEEP_WAKEUP_NSEC / 1000);
}
break;
default:
break;
}
}
else
{
#ifdef CONFIG_WATCHDOG
/* Announce the power management state change to feed watchdog */
pm_changestate(PM_IDLE_DOMAIN, PM_NORMAL);
#endif
}
}
#else
# define up_idlepm()
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -86,6 +207,10 @@ void up_idle(void)
# if XCHAL_HAVE_INTERRUPTS
__asm__ __volatile__ ("waiti 0");
# endif
/* Perform IDLE mode power management */
up_idlepm();
#endif /* CONFIG_SUPPRESS_INTERRUPTS || CONFIG_SUPPRESS_TIMER_INTS */
#ifdef CONFIG_ESP32S3_SPEED_UP_ISR
File diff suppressed because it is too large Load Diff
+302
View File
@@ -0,0 +1,302 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_pm.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_PM_H
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_PM_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdint.h>
#include <stdbool.h>
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#ifdef CONFIG_PM
/****************************************************************************
* Public Types
****************************************************************************/
/* Callback function type for peripherals to
* know light sleep wakeup overhead.
*/
typedef void (*inform_out_sleep_overhead_cb_t)(uint32_t);
/* Callback function type for peripherals to skip light sleep. */
typedef bool (*skip_light_sleep_cb_t)(void);
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp32s3_sleep_enable_timer_wakeup
*
* Description:
* Configure wake-up interval
*
* Input Parameters:
* time_in_us - Configure wake-up time interval
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_sleep_enable_timer_wakeup(uint64_t time_in_us);
/****************************************************************************
* Name: esp32s3_light_sleep_start
*
* Description:
* Enter light sleep mode
*
* Input Parameters:
* sleep_time - Actual sleep time
*
* Returned Value:
* 0 is returned on success or a negated errno value is returned
*
****************************************************************************/
int esp32s3_light_sleep_start(uint64_t *sleep_time);
/****************************************************************************
* Name: esp32s3_pmstandby
*
* Description:
* Enter force sleep time interval.
*
* Input Parameters:
* time_in_us - Force sleep time interval
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_pmstandby(uint64_t time_in_us);
/****************************************************************************
* Name: esp32s3_deep_sleep_start
*
* Description:
* Enter deep sleep mode
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_deep_sleep_start(void);
/****************************************************************************
* Name: esp32s3_pmsleep
*
* Description:
* Enter deep sleep.
*
* Input Parameters:
* time_in_us - Deep sleep time interval
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_pmsleep(uint64_t time_in_us);
/****************************************************************************
* Name: esp32s3_pm_lockacquire
*
* Description:
* Take a power management lock
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_pm_lockacquire(void);
/****************************************************************************
* Name: esp32s3_pm_lockrelease
*
* Description:
* Release the lock taken using esp32s3_pm_lockacquire.
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_pm_lockrelease(void);
/****************************************************************************
* Name: esp32s3_pm_lockstatus
*
* Description:
* Return power management lock status.
*
* Input Parameters:
* None
*
* Returned Value:
* Current pm_wakelock count
*
****************************************************************************/
uint32_t esp32s3_pm_lockstatus(void);
/****************************************************************************
* Name: esp32s3_sleep_enable_wifi_wakeup
*
* Description:
* Configure Wi-Fi wake-up source
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_sleep_enable_wifi_wakeup(void);
/****************************************************************************
* Name: esp32s3_should_skip_light_sleep
*
* Description:
* Indicates if light sleep shoule be skipped.
*
* Input Parameters:
* None
*
* Returned Value:
* True is returned on success. Otherwise false.
*
****************************************************************************/
bool esp32s3_should_skip_light_sleep(void);
/****************************************************************************
* Name: esp32s3_pm_register_inform_out_sleep_overhead_callback
*
* Description:
* Register informing peripherals of light sleep wakeup overhead time
* callback function.
*
* Input Parameters:
* cb - Callback function
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise -1 (ERROR).
*
****************************************************************************/
int esp32s3_pm_register_inform_out_sleep_overhead_callback(
inform_out_sleep_overhead_cb_t cb);
/****************************************************************************
* Name: esp32s3_pm_unregister_inform_out_sleep_overhead_callback
*
* Description:
* Unregister informing peripherals of light sleep wakeup overhead time
* callback function.
*
* Input Parameters:
* cb - Callback function
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise -1 (ERROR).
*
****************************************************************************/
int esp32s3_pm_unregister_inform_out_sleep_overhead_callback(
inform_out_sleep_overhead_cb_t cb);
/****************************************************************************
* Name: esp32s3_pm_register_skip_sleep_callback
*
* Description:
* Unregister callback function of skipping light sleep.
*
* Input Parameters:
* cb - Callback function
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise -1 (ERROR).
*
****************************************************************************/
int esp32s3_pm_register_skip_sleep_callback(skip_light_sleep_cb_t cb);
/****************************************************************************
* Name: esp32s3_pm_unregister_skip_sleep_callback
*
* Description:
* Register callback function of skipping light sleep.
*
* Input Parameters:
* cb - Callback function
*
* Returned Value:
* Zero (OK) is returned on success. Otherwise -1 (ERROR).
*
****************************************************************************/
int esp32s3_pm_unregister_skip_sleep_callback(skip_light_sleep_cb_t cb);
#endif /* CONFIG_PM */
#ifdef __cplusplus
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_PM_H */
@@ -0,0 +1,49 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_pminitialize.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/power/pm.h>
#ifdef CONFIG_PM
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: xtensa_pminitialize
*
* Description:
* Initialize the power management subsystem.
*
****************************************************************************/
void xtensa_pminitialize(void)
{
/* Initialize the NuttX power management subsystem proper */
pm_initialize();
}
#endif /* CONFIG_PM */
File diff suppressed because it is too large Load Diff
+32
View File
@@ -68,6 +68,21 @@ extern "C"
#define RTC_CLK_CAL_FRACT 19
/* Cycles for RTC Timer clock source (internal oscillator) calibrate */
#define RTC_CLK_SRC_CAL_CYCLES (10)
#define RTC_CNTL_XTL_BUF_WAIT_SLP_US (250)
#define RTC_CNTL_PLL_BUF_WAIT_SLP_CYCLES (1)
#define RTC_CNTL_CK8M_WAIT_SLP_CYCLES (4)
#define RTC_CNTL_WAKEUP_DELAY_CYCLES (4)
#define RTC_CNTL_CK8M_DFREQ_DEFAULT 100
#define RTC_CNTL_SCK_DCAP_DEFAULT 255
#define RTC_CNTL_ULPCP_TOUCH_START_WAIT_IN_SLEEP (0xFF)
#define RTC_CNTL_ULPCP_TOUCH_START_WAIT_DEFAULT (0x10)
/****************************************************************************
* Public Types
****************************************************************************/
@@ -350,6 +365,23 @@ void esp32s3_rtc_init(void);
uint64_t esp32s3_rtc_time_get(void);
/****************************************************************************
* Name: esp32s3_rtc_sleep_low_init
*
* Description:
* Low level initialize for rtc state machine waiting
* cycles after waking up.
*
* Input Parameters:
* slowclk_period - Re-calibrated slow clock period
*
* Returned Value:
* None
*
****************************************************************************/
void esp32s3_rtc_sleep_low_init(uint32_t slowclk_period);
/****************************************************************************
* Name: esp32s3_rtc_time_us_to_slowclk
*
@@ -5893,4 +5893,15 @@
#define RTC_SLEEP_PD_XTAL BIT(11)
/* These flags are not power domains, but will affect some sleep parameters */
#define RTC_SLEEP_DIG_USE_8M BIT(16)
#define RTC_SLEEP_USE_ADC_TESEN_MONITOR BIT(17)
/* Avoid using ultra low power in deep sleep, in which RTCIO cannot
* be used as input, and RTCMEM can't work under high temperature
*/
#define RTC_SLEEP_NO_ULTRA_LOW BIT(18)
#endif /* __ARCH_XTENSA_SRC_ESP32S3_HARDWARE_ESP32S3_RTCCNTL_H */
+20 -20
View File
@@ -860,7 +860,7 @@
* Rx Filter configuration
*/
#define UART_RX_FILT_REG (DR_REG_UART_BASE + 0x18)
#define UART_RX_FILT_REG(i) (REG_UART_BASE(i) + 0x18)
/* UART_GLITCH_FILT_EN : R/W; bitpos: [8]; default: 0;
* Set this bit to enable Rx signal filter.
@@ -1280,7 +1280,7 @@
* Autobaud minimum low pulse duration register
*/
#define UART_LOWPULSE_REG (DR_REG_UART_BASE + 0x28)
#define UART_LOWPULSE_REG(i) (REG_UART_BASE(i) + 0x28)
/* UART_LOWPULSE_MIN_CNT : RO; bitpos: [11:0]; default: 4095;
* This register stores the value of the minimum duration time of the low
@@ -1296,7 +1296,7 @@
* Autobaud minimum high pulse duration register
*/
#define UART_HIGHPULSE_REG (DR_REG_UART_BASE + 0x2c)
#define UART_HIGHPULSE_REG(i) (REG_UART_BASE(i) + 0x2c)
/* UART_HIGHPULSE_MIN_CNT : RO; bitpos: [11:0]; default: 4095;
* This register stores the value of the maximum duration time for the high
@@ -1312,7 +1312,7 @@
* Autobaud edge change count register
*/
#define UART_RXD_CNT_REG (DR_REG_UART_BASE + 0x30)
#define UART_RXD_CNT_REG(i) (REG_UART_BASE(i) + 0x30)
/* UART_RXD_EDGE_CNT : RO; bitpos: [9:0]; default: 0;
* This register stores the count of rxd edge change. It is used in baud
@@ -1328,7 +1328,7 @@
* Software flow-control configuration
*/
#define UART_FLOW_CONF_REG (DR_REG_UART_BASE + 0x34)
#define UART_FLOW_CONF_REG(i) (REG_UART_BASE(i) + 0x34)
/* UART_SEND_XOFF : R/W/SS/SC; bitpos: [5]; default: 0;
* Set this bit to send Xoff char. It is cleared by hardware automatically.
@@ -1389,7 +1389,7 @@
* Sleep-mode configuration
*/
#define UART_SLEEP_CONF_REG (DR_REG_UART_BASE + 0x38)
#define UART_SLEEP_CONF_REG(i) (REG_UART_BASE(i) + 0x38)
/* UART_ACTIVE_THRESHOLD : R/W; bitpos: [9:0]; default: 240;
* The uart is activated from light sleeping mode when the input rxd edge
@@ -1405,7 +1405,7 @@
* Software flow-control character configuration
*/
#define UART_SWFC_CONF0_REG (DR_REG_UART_BASE + 0x3c)
#define UART_SWFC_CONF0_REG(i) (REG_UART_BASE(i) + 0x3c)
/* UART_XOFF_CHAR : R/W; bitpos: [17:10]; default: 19;
* This register stores the Xoff flow control char.
@@ -1430,7 +1430,7 @@
* Software flow-control character configuration
*/
#define UART_SWFC_CONF1_REG (DR_REG_UART_BASE + 0x40)
#define UART_SWFC_CONF1_REG(i) (REG_UART_BASE(i) + 0x40)
/* UART_XON_CHAR : R/W; bitpos: [17:10]; default: 17;
* This register stores the Xon flow control char.
@@ -1455,7 +1455,7 @@
* Tx Break character configuration
*/
#define UART_TXBRK_CONF_REG (DR_REG_UART_BASE + 0x44)
#define UART_TXBRK_CONF_REG(i) (REG_UART_BASE(i) + 0x44)
/* UART_TX_BRK_NUM : R/W; bitpos: [7:0]; default: 10;
* This register is used to configure the number of 0 to be sent after the
@@ -1567,7 +1567,7 @@
* Pre-sequence timing configuration
*/
#define UART_AT_CMD_PRECNT_REG (DR_REG_UART_BASE + 0x50)
#define UART_AT_CMD_PRECNT_REG(i) (REG_UART_BASE(i) + 0x50)
/* UART_PRE_IDLE_NUM : R/W; bitpos: [15:0]; default: 2305;
* This register is used to configure the idle duration time before the
@@ -1583,7 +1583,7 @@
* Post-sequence timing configuration
*/
#define UART_AT_CMD_POSTCNT_REG (DR_REG_UART_BASE + 0x54)
#define UART_AT_CMD_POSTCNT_REG(i) (REG_UART_BASE(i) + 0x54)
/* UART_POST_IDLE_NUM : R/W; bitpos: [15:0]; default: 2305;
* This register is used to configure the duration time between the last
@@ -1599,7 +1599,7 @@
* Timeout configuration
*/
#define UART_AT_CMD_GAPTOUT_REG (DR_REG_UART_BASE + 0x58)
#define UART_AT_CMD_GAPTOUT_REG(i) (REG_UART_BASE(i) + 0x58)
/* UART_RX_GAP_TOUT : R/W; bitpos: [15:0]; default: 11;
* This register is used to configure the duration time between the at_cmd
@@ -1615,7 +1615,7 @@
* AT escape sequence detection configuration
*/
#define UART_AT_CMD_CHAR_REG (DR_REG_UART_BASE + 0x5c)
#define UART_AT_CMD_CHAR_REG(i) (REG_UART_BASE(i) + 0x5c)
/* UART_CHAR_NUM : R/W; bitpos: [15:8]; default: 3;
* This register is used to configure the num of continuous at_cmd chars
@@ -1705,7 +1705,7 @@
* Tx-FIFO write and read offset address.
*/
#define UART_MEM_TX_STATUS_REG (DR_REG_UART_BASE + 0x64)
#define UART_MEM_TX_STATUS_REG(i) (REG_UART_BASE(i) + 0x64)
/* UART_TX_RADDR : RO; bitpos: [20:11]; default: 0;
* This register stores the offset address in Tx-FIFO when Tx-FSM reads data
@@ -1731,7 +1731,7 @@
* Rx-FIFO write and read offset address.
*/
#define UART_MEM_RX_STATUS_REG (DR_REG_UART_BASE + 0x68)
#define UART_MEM_RX_STATUS_REG(i) (REG_UART_BASE(i) + 0x68)
/* UART_RX_WADDR : RO; bitpos: [20:11]; default: 512;
* This register stores the offset address in Rx-FIFO when Rx-FIFO_Ctrl
@@ -1758,7 +1758,7 @@
* UART transmit and receive status.
*/
#define UART_FSM_STATUS_REG (DR_REG_UART_BASE + 0x6c)
#define UART_FSM_STATUS_REG(i) (REG_UART_BASE(i) + 0x6c)
/* UART_ST_UTX_OUT : RO; bitpos: [7:4]; default: 0;
* This is the status register of transmitter.
@@ -1782,7 +1782,7 @@
* Autobaud high pulse register
*/
#define UART_POSPULSE_REG (DR_REG_UART_BASE + 0x70)
#define UART_POSPULSE_REG(i) (REG_UART_BASE(i) + 0x70)
/* UART_POSEDGE_MIN_CNT : RO; bitpos: [11:0]; default: 4095;
* This register stores the minimal input clock count between two positive
@@ -1798,7 +1798,7 @@
* Autobaud low pulse register
*/
#define UART_NEGPULSE_REG (DR_REG_UART_BASE + 0x74)
#define UART_NEGPULSE_REG(i) (REG_UART_BASE(i) + 0x74)
/* UART_NEGEDGE_MIN_CNT : RO; bitpos: [11:0]; default: 4095;
* This register stores the minimal input clock count between two negative
@@ -1910,7 +1910,7 @@
* UART Version register
*/
#define UART_DATE_REG (DR_REG_UART_BASE + 0x7c)
#define UART_DATE_REG(i) (REG_UART_BASE(i) + 0x7c)
/* UART_DATE : R/W; bitpos: [31:0]; default: 33587824;
* This is the version register.
@@ -1925,7 +1925,7 @@
* UART ID register
*/
#define UART_ID_REG (DR_REG_UART_BASE + 0x80)
#define UART_ID_REG(i) (REG_UART_BASE(i) + 0x80)
/* UART_REG_UPDATE : R/W/SC; bitpos: [31]; default: 0;
* Software write 1 would synchronize registers into UART Core clock domain
@@ -60,4 +60,36 @@ config ESP32S3_SPIFLASH_LITTLEFS
endchoice # ESP32S3_SPIFLASH_FS
if PM
config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15
depends on PM
---help---
Number of seconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_ALARM_NSEC
int "PM_STANDBY delay (nanoseconds)"
default 0
depends on PM
---help---
Number of additional nanoseconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP_SEC
int "PM_SLEEP delay (seconds)"
default 20
depends on PM
---help---
Number of seconds to wait in PM_SLEEP.
config PM_SLEEP_WAKEUP_NSEC
int "PM_SLEEP delay (nanoseconds)"
default 0
depends on PM
---help---
Number of additional nanoseconds to wait in PM_SLEEP.
endif # PM
endif # ARCH_BOARD_ESP32S3_DEVKIT
@@ -0,0 +1,52 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32s3-devkit"
CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_ESP32S3_DEVKIT=y
CONFIG_ARCH_CHIP="esp32s3"
CONFIG_ARCH_CHIP_ESP32S3=y
CONFIG_ARCH_CHIP_ESP32S3WROOM1=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_ESP32S3_UART0=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PM=y
CONFIG_PM_GOVERNOR_EXPLICIT_RELAX=-1
CONFIG_PM_GOVERNOR_GREEDY=y
CONFIG_PM_PROCFS=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_SYSLOG_BUFFER=y
CONFIG_SYSTEM_NSH=y
CONFIG_UART0_SERIAL_CONSOLE=y