29 On-Chip Sensors and Analog Signal Processing
29.4.3 Structure
The two 8-bit DAC channels can be configured independently. For each DAC channel, the output analog voltage
can be calculated as follows:
• VDD3P3_RTC is the voltage on pin VDD3P3_RTC (typically 3.3V).
• PDACn_DAC has multiple sources:
The start of conversion is determined by register RTCIO_PAD_PDACn_XPD_DAC. The conversion process itself
is controlled by software or SAR ADC FSM; see Figure 29-9.
29.4.4 Cosine Waveform Generator
The cosine waveform (CW) generator can be used to generate a cosine / sine tone. A diagram showing cosine
waveform generator's function is presented in Figure 29-10.
The CW generator has the following features:
• Adjustable frequency
The frequency of CW can be adjusted by register SENS_SAR_SW_FSTEP[15:0]:
The frequency of dig_clk_rtc is typically 8 MHz.
• Scaling
Configuring register SENS_SAR_DAC_SCALEn[1:0]; the amplitude of a CW can be multiplied by 1, 1/2, 1/4
or 1/8.
• DC offset
The offset may be introduced by register SENS_SAR_DAC_DCn[7:0]. The result will be saturated.
• Phase shift
A phase-shift of 0 / 90 / 180 / 270 degrees can be added by setting register SENS_SAR_DAC_INVn[1:0].
Espressif Systems
Figure 29-9. Diagram of DAC Function
DACn_OUT = VDD3P3_RTC · PDACn_DAC/255
CW
generator, register RTCIO_PAD_DACn_REG, and DMA.
freq = dig_clk_rtc_freq · SENS_SAR_SW_FSTEP/65536
647
Submit Documentation Feedback
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?