Skip to content

Commit 83c315c

Browse files
committed
Merge branch 'feat/mcpwm_support_h4' into 'master'
Feat/mcpwm support h4 Closes IDF-12380 and IDF-12381 See merge request espressif/esp-idf!43003
2 parents be3dd5a + 4a22e36 commit 83c315c

File tree

20 files changed

+2144
-357
lines changed

20 files changed

+2144
-357
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| Supported Targets | ESP32 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S3 |
2-
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
1+
| Supported Targets | ESP32 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-H4 | ESP32-P4 | ESP32-S3 |
2+
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |

components/esp_hal_mcpwm/esp32c5/mcpwm_periph.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
8484

8585
/**
8686
* MCPWM Registers to be saved during sleep retention
87-
* - Clk Configuration registers, e.g.: MCPWM_CLK_CFG_REG
8887
* - Timer Configuration registers, e.g.: MCPWM_TIMER_SYNCI_CFG_REG, MCPWM_TIMER0_CFG0_REG, MCPWM_TIMER0_CFG1_REG, MCPWM_TIMER0_CFG1_REG
8988
* - Operator Configuration registers, e.g.: MCPWM_OPERATOR_TIMERSEL_REG
9089
* |- Generator Configuration registers, e.g.: MCPWM_GEN0_STMP_CFG_REG, MCPWM_GEN0_TSTMP_A_REG, MCPWM_GEN0_TSTMP_B_REG, MCPWM_GEN0_CFG0_REG, MCPWM_GEN0_FORCE_REG, MCPWM_GEN0_A_REG, MCPWM_GEN0_B_REG
@@ -96,9 +95,9 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
9695
* - ETM Configurations, e.g.: MCPWM_EVT_EN_REG, MCPWM_EVT_EN2_REG, MCPWM_TASK_EN_REG, MCPWM_OP0_TSTMP_E1_REG, MCPWM_OP0_TSTMP_E2_REG, MCPWM_OP1_TSTMP_E1_REG, MCPWM_OP1_TSTMP_E2_REG, MCPWM_OP2_TSTMP_E1_REG, MCPWM_OP2_TSTMP_E2_REG
9796
* - Misc Configurations, e.g.: MCPWM_UPDATE_CFG_REG
9897
*/
99-
#define MCPWM_RETENTION_REGS_CNT 68
100-
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x0)
101-
static const uint32_t mcpwm_regs_map[4] = {0xefffeeef, 0x7efffbff, 0x1ff18, 0x0};
98+
#define MCPWM_RETENTION_REGS_CNT 67
99+
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x4)
100+
static const uint32_t mcpwm_regs_map[4] = {0xf7fff777, 0x3f7ffdff, 0xff8c, 0x0};
102101
static const regdma_entries_config_t mcpwm_regs_retention[] = {
103102
// backup stage: save configuration registers
104103
// restore stage: restore the configuration registers

components/esp_hal_mcpwm/esp32c6/mcpwm_periph.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
8383

8484
/**
8585
* MCPWM Registers to be saved during sleep retention
86-
* - Clk Configuration registers, e.g.: MCPWM_CLK_CFG_REG
8786
* - Timer Configuration registers, e.g.: MCPWM_TIMER_SYNCI_CFG_REG, MCPWM_TIMER0_CFG0_REG, MCPWM_TIMER0_CFG1_REG, MCPWM_TIMER0_CFG1_REG
8887
* - Operator Configuration registers, e.g.: MCPWM_OPERATOR_TIMERSEL_REG
8988
* |- Generator Configuration registers, e.g.: MCPWM_GEN0_STMP_CFG_REG, MCPWM_GEN0_TSTMP_A_REG, MCPWM_GEN0_TSTMP_B_REG, MCPWM_GEN0_CFG0_REG, MCPWM_GEN0_FORCE_REG, MCPWM_GEN0_A_REG, MCPWM_GEN0_B_REG
@@ -95,9 +94,9 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
9594
* - ETM Configurations, e.g.: MCPWM_EVT_EN_REG, MCPWM_TASK_EN_REG
9695
* - Misc Configurations, e.g.: MCPWM_UPDATE_CFG_REG
9796
*/
98-
#define MCPWM_RETENTION_REGS_CNT 61
99-
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x0)
100-
static const uint32_t mcpwm_regs_map[4] = {0xefffeeef, 0x7efffbff, 0x318, 0x0};
97+
#define MCPWM_RETENTION_REGS_CNT 60
98+
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x4)
99+
static const uint32_t mcpwm_regs_map[4] = {0xf7fff777, 0x3f7ffdff, 0x18c, 0x0};
101100
static const regdma_entries_config_t mcpwm_regs_retention[] = {
102101
// backup stage: save configuration registers
103102
// restore stage: restore the configuration registers

components/esp_hal_mcpwm/esp32h2/mcpwm_periph.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
8383

8484
/**
8585
* MCPWM Registers to be saved during sleep retention
86-
* - Clk Configuration registers, e.g.: MCPWM_CLK_CFG_REG
8786
* - Timer Configuration registers, e.g.: MCPWM_TIMER_SYNCI_CFG_REG, MCPWM_TIMER0_CFG0_REG, MCPWM_TIMER0_CFG1_REG, MCPWM_TIMER0_CFG1_REG
8887
* - Operator Configuration registers, e.g.: MCPWM_OPERATOR_TIMERSEL_REG
8988
* |- Generator Configuration registers, e.g.: MCPWM_GEN0_STMP_CFG_REG, MCPWM_GEN0_TSTMP_A_REG, MCPWM_GEN0_TSTMP_B_REG, MCPWM_GEN0_CFG0_REG, MCPWM_GEN0_FORCE_REG, MCPWM_GEN0_A_REG, MCPWM_GEN0_B_REG
@@ -95,9 +94,9 @@ const soc_mcpwm_signal_desc_t soc_mcpwm_signals[1] = {
9594
* - ETM Configurations, e.g.: MCPWM_EVT_EN_REG, MCPWM_TASK_EN_REG
9695
* - Misc Configurations, e.g.: MCPWM_UPDATE_CFG_REG
9796
*/
98-
#define MCPWM_RETENTION_REGS_CNT 61
99-
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x0)
100-
static const uint32_t mcpwm_regs_map[4] = {0xefffeeef, 0x7efffbff, 0x318, 0x0};
97+
#define MCPWM_RETENTION_REGS_CNT 60
98+
#define MCPWM_RETENTION_REGS_BASE (DR_REG_MCPWM_BASE + 0x4)
99+
static const uint32_t mcpwm_regs_map[4] = {0xf7fff777, 0x3f7ffdff, 0x18c, 0x0};
101100
static const regdma_entries_config_t mcpwm_regs_retention[] = {
102101
// backup stage: save configuration registers
103102
// restore stage: restore the configuration registers

0 commit comments

Comments
 (0)