File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ the prescaler of the MCPWM0 peripheral.
3232 mem32[MCPWM0] = 0x55 # change PWM_CLK_PRESCALE
3333 print(hex(mem32[MCPWM0])) # read PWM_CLK_CFG_REG
3434
35+ The specific addresses will be different on different ESP32
36+ models. For example, ESP32-S3 uses these values:
37+
38+ .. code-block :: python3
39+
40+ DR_REG_DPORT_BASE = const(0x600C_0000)
41+ DPORT_PERIP_CLK_EN0_REG = const(DR_REG_DPORT_BASE + 0x0018)
42+ DPORT_PERIP_RST_EN0_REG = const(DR_REG_DPORT_BASE + 0x0020)
43+ DPORT_PWM0_CLK_EN = const(1 << 17)
44+ MCPWM0 = const(0x6001_E000 + 0x0004)
45+ ...
46+
3547 Note that before a peripheral can be used its clock must be enabled and it must
3648be taken out of reset. In the above example the following registers are used
3749for this:
You can’t perform that action at this time.
0 commit comments