[−][src]Module esp32_hal::clock_control
Clock and RTC watchdog control.
Controls the clock source for CPU, RTC, APB, etc. Also controls RTC watchdog timer.
TODO
- Auto detect flash frequency
- Low Power Clock (LPClock, regs: DPORT_BT_LPCK_DIV_FRAC_REG,DPORT_BT_LPCK_DIV_INT_REG)
- LED clock selection in ledc peripheral
- 8M and 8MD256 enable/disable
- 150kHz enable/disable
- APLL support
- Implement light sleep
- 32kHz Xtal support
- Allow 8.5MHz clock to be tuned
- Automatic enabling/disabling of 8MHz source (when not in use for rtc_fast_clk or cpu frequency)
Modules
config | |
cpu | Control Cores |
dfs | Dynamic Frequency Switching control |
watchdog | RTC Watchdog implementation |
Structs
ClockControl | Clock Control for initialization. Once initialization is done, call the freeze function to lock the clock configuration. This will return a ClockControlConfig, which can be copied for e.g. use in multiple peripherals. |
ClockControlConfig | Clock configuration & locking for Dynamic Frequency Switching. It allows thread and interrupt safe way to switch between default, high CPU and APB frequency configuration. |
Enums
CPUSource | CPU/APB/REF clock source |
Error | RTC Clock errors |
FastRTCSource | Fast RTC clock source |
SlowRTCSource | Slow RTC clock source |
Constants
XTAL_FREQUENCY_24M | |
XTAL_FREQUENCY_26M | |
XTAL_FREQUENCY_40M | |
XTAL_FREQUENCY_AUTO |
Functions
sleep | Sleep by spinning |