mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(tsens): Add tsens support on esp32s31
This commit is contained in:
@@ -99,6 +99,10 @@ config SOC_USB_OTG_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TEMP_SENSOR_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_ULP_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
@@ -1534,3 +1538,19 @@ config SOC_I2S_PDM_MAX_RX_LINES
|
||||
config SOC_ASRC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TEMPERATURE_SENSOR_INTR_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TSENS_IS_INDEPENDENT_FROM_ADC
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TEMPERATURE_SENSOR_SUPPORT_ETM
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TEMPERATURE_SENSOR_SUPPORT_SLEEP_RETENTION
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -710,6 +710,21 @@ typedef enum {
|
||||
ADC_DIGI_CLK_SRC_DEFAULT = SOC_MOD_CLK_XTAL, /*!< Select XTAL as the default clock choice */
|
||||
} soc_periph_adc_digi_clk_src_t;
|
||||
|
||||
//////////////////////////////////////////////////Temp Sensor///////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @brief Array initializer for all supported clock sources of Temperature Sensor
|
||||
*/
|
||||
#define SOC_TEMP_SENSOR_CLKS {SOC_MOD_CLK_LP_PERI}
|
||||
|
||||
/**
|
||||
* @brief Type of Temp Sensor clock source
|
||||
*/
|
||||
typedef enum {
|
||||
TEMPERATURE_SENSOR_CLK_SRC_LP_PERI = SOC_MOD_CLK_LP_PERI, /*!< Select LP_PERI as the source clock */
|
||||
TEMPERATURE_SENSOR_CLK_SRC_DEFAULT = SOC_MOD_CLK_LP_PERI, /*!< Select LP_PERI as the default choice */
|
||||
} soc_periph_temperature_sensor_clk_src_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#define SOC_ASYNC_MEMCPY_SUPPORTED 1
|
||||
#define SOC_USB_OTG_SUPPORTED 1
|
||||
// #define SOC_USB_SERIAL_JTAG_SUPPORTED 1 // TODO: [ESP32S31] IDF-14788
|
||||
// #define SOC_TEMP_SENSOR_SUPPORTED 1 // TODO: [ESP32S31] IDF-14799
|
||||
#define SOC_TEMP_SENSOR_SUPPORTED 1
|
||||
// #define SOC_SUPPORTS_SECURE_DL_MODE 1 // TODO: [ESP32S31] IDF-14629
|
||||
#define SOC_ULP_SUPPORTED 1
|
||||
#define SOC_LP_CORE_SUPPORTED 1
|
||||
@@ -584,3 +584,10 @@
|
||||
|
||||
/*---------------------------------- ASRC CAPS ----------------------------------*/
|
||||
#define SOC_ASRC_SUPPORTED (1)
|
||||
|
||||
/*-------------------------- Temperature Sensor CAPS -------------------------------------*/
|
||||
#define SOC_TEMPERATURE_SENSOR_INTR_SUPPORT (1)
|
||||
#define SOC_TSENS_IS_INDEPENDENT_FROM_ADC (1) /*!< Temperature sensor is a separate module, not share regs with ADC */
|
||||
#define SOC_TEMPERATURE_SENSOR_SUPPORT_ETM (1)
|
||||
// temperature sensor on esp32s31 in under low power domain.
|
||||
#define SOC_TEMPERATURE_SENSOR_SUPPORT_SLEEP_RETENTION (1)
|
||||
|
||||
@@ -222,6 +222,7 @@ typedef struct {
|
||||
volatile tsens_sample_rate_reg_t sample_rate;
|
||||
} tsens_dev_t;
|
||||
|
||||
extern tsens_dev_t TSENS;
|
||||
|
||||
#ifndef __cplusplus
|
||||
_Static_assert(sizeof(tsens_dev_t) == 0x2c, "Invalid size of tsens_dev_t structure");
|
||||
|
||||
Reference in New Issue
Block a user