You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/platforms/risc-v/esp32c3/index.rst
+34-2
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ where:
131
131
* ``ESPTOOL_BINDIR=./`` is the path of the externally-built 2nd stage bootloader and the partition table (if applicable): when built using the ``make bootloader``, these files are placed into ``nuttx`` folder.
132
132
* ``ESPTOOL_BAUD`` is able to change the flash baud rate if desired.
133
133
134
-
Flashing NSH Example
134
+
Flashing NSH Example
135
135
--------------------
136
136
137
137
This example shows how to build and flash the ``nsh`` defconfig for the ESP32-C3-DevKitC-02 board::
@@ -343,7 +343,7 @@ The following list indicates the state of peripherals' support in NuttX:
343
343
=========== ======= ====================
344
344
Peripheral Support NOTES
345
345
=========== ======= ====================
346
-
ADC No
346
+
ADC Yes Oneshot
347
347
AES No
348
348
Bluetooth Yes
349
349
CAN/TWAI Yes
@@ -370,6 +370,38 @@ Watchdog Yes XTWDT supported
370
370
Wi-Fi Yes WPA3-SAE supported
371
371
=========== ======= ====================
372
372
373
+
Analog-to-digital converter (ADC)
374
+
---------------------------------
375
+
376
+
Two ADC units are available for the ESP32-C3:
377
+
378
+
* ADC1 with 5 channels.
379
+
* ADC2 with 1 channel and internal voltage reading. **This unit is not implemented.**
380
+
381
+
Those units are independent and can be used simultaneously. During bringup, GPIOs for selected channels are
382
+
configured automatically to be used as ADC inputs.
383
+
If available, ADC calibration is automatically applied (see
384
+
`this page <https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32c3/api-reference/peripherals/adc_calibration.html>`__ for more details).
385
+
Otherwise, a simple conversion is applied based on the attenuation and resolution.
386
+
387
+
The ADC unit is accessible using the ADC character driver, which returns data for the enabled channels.
388
+
389
+
The ADC1 unit can be enabled in the menu :menuselection:`System Type --> Peripheral Support --> Analog-to-digital converter (ADC)`.
390
+
391
+
Then, it can be customized in the menu :menuselection:`System Type --> ADC Configuration`, which includes operating mode, gain and channels.
392
+
393
+
========== ===========
394
+
Channel ADC1 GPIO
395
+
========== ===========
396
+
0 0
397
+
1 1
398
+
2 2
399
+
3 3
400
+
4 4
401
+
========== ===========
402
+
403
+
.. warning:: Maximum measurable voltage may saturate around 2900 mV.
0 commit comments