From f1c7a3e06d5ee33e9212fbfc3c914554efbeebce Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 21 Jan 2021 15:15:44 +0800 Subject: [PATCH 1/2] doc: update rmt doc for esp32c3 --- docs/en/api-reference/peripherals/rmt.rst | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/en/api-reference/peripherals/rmt.rst b/docs/en/api-reference/peripherals/rmt.rst index 4540bcf9c8..5c9684d2a3 100644 --- a/docs/en/api-reference/peripherals/rmt.rst +++ b/docs/en/api-reference/peripherals/rmt.rst @@ -99,6 +99,9 @@ There couple of typical steps to setup and operate the RMT and they are discusse The RMT has four channels numbered from zero to three. Each channel is able to independently transmit or receive data. They are referred to using indexes defined in structure :cpp:type:`rmt_channel_t`. +.. only:: esp32c3 + + The RMT has four channels numbered from zero to three. The first half (i.e. Channel 0 ~ 1) channels can only be configured for transmitting, and the other half (i.e. Channel 2 ~ 3) channels can only be configured for receiving. They are referred to using indexes defined in structure :cpp:type:`rmt_channel_t`. Configure Driver ---------------- @@ -211,6 +214,10 @@ Receive Data Before starting the receiver we need some storage for incoming items. The RMT controller has 256 x 32-bits of internal RAM shared between all four channels. +.. only:: esp32c3 + + Before starting the receiver we need some storage for incoming items. The RMT controller has 192 x 32-bits of internal RAM shared between all four channels. + In typical scenarios it is not enough as an ultimate storage for all incoming (and outgoing) items. Therefore this API supports retrieval of incoming items on the fly to save them in a ring buffer of a size defined by the user. The size is provided when calling :cpp:func:`rmt_driver_install` discussed above. To get a handle to this buffer call :cpp:func:`rmt_get_ringbuf_handle`. With the above steps complete we can start the receiver by calling :cpp:func:`rmt_rx_start` and then move to checking what's inside the buffer. To do so, you can use common FreeRTOS functions that interact with the ring buffer. Please see an example how to do it in :example:`peripherals/rmt/ir_protocols`. @@ -267,16 +274,15 @@ The RMT controller triggers interrupts on four specific events describes below. Setting or clearing an interrupt enable mask for specific channels and events may be also done by calling :cpp:func:`rmt_set_intr_enable_mask` or :cpp:func:`rmt_clr_intr_enable_mask`. -.. only:: esp32 - - When servicing an interrupt within an ISR, the interrupt need to explicitly cleared. To do so, set specific bits described as ``RMT.int_clr.val.chN_event_name`` and defined as a ``volatile struct`` in :component_file:`soc/esp32/include/soc/rmt_struct.h`, where N is the RMT channel number [0, n] and the ``event_name`` is one of four events described above. - -.. only:: esp32s2 - - When servicing an interrupt within an ISR, the interrupt need to explicitly cleared. To do so, set specific bits described as ``RMT.int_clr.val.chN_event_name`` and defined as a ``volatile struct`` in :component_file:`soc/esp32s2/include/soc/rmt_struct.h`, where N is the RMT channel number [0, n] and the ``event_name`` is one of four events described above. +When servicing an interrupt within an ISR, the interrupt need to explicitly cleared. To do so, set specific bits described as ``RMT.int_clr.val.chN_event_name`` and defined as a ``volatile struct`` in :component_file:`soc/{IDF_TARGET_PATH_NAME}/include/soc/rmt_struct.h`, where N is the RMT channel number [0, n] and the ``event_name`` is one of four events described above. If you do not need an ISR anymore, you can deregister it by calling a function :cpp:func:`rmt_isr_deregister`. +.. warning:: + + It's not recommended for users to register an interrupt handler in their applications. RMT driver is highly dependent on interrupt, especially when doing transaction in a ping-pong way, so the driver itself has registered a default handler called ``rmt_driver_isr_default``. + Instead, if what you want is to get a notification when transaction is done, go ahead with :cpp:func:`rmt_register_tx_end_callback`. + Uninstall Driver ---------------- From 5fe6c9f8ab2fdcc0a788adaa8cddac207a66fa8b Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 21 Jan 2021 16:05:34 +0800 Subject: [PATCH 2/2] doc: update sigma-delta doc for esp32c3 --- docs/_static/typical_sallenkey_LP_filter.png | Bin 0 -> 13786 bytes .../api-reference/peripherals/sigmadelta.rst | 26 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docs/_static/typical_sallenkey_LP_filter.png diff --git a/docs/_static/typical_sallenkey_LP_filter.png b/docs/_static/typical_sallenkey_LP_filter.png new file mode 100644 index 0000000000000000000000000000000000000000..b6685bba9dfc2d6191d43bf465a9f215693076e9 GIT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jVXO$>t4pBK+LN-X0A-S4wI<7NgFT%MSzYj$8RFo=j>MU`()_Vh!w%Iy?;Sd z!9VLtV016WLWNU(xkJ8jUL<9E?yrI@qZdn7a9gps+TLKJ_O$dBn}sKvq56OoKyp91 zyi8@6$o!tK3I)T=FB3;_$cr=rB1t=*=X6x+p@7w~ndrVF>0vvNPTRQA^uop<0^Jjs z6K&LFMU3>r(r3wADCPadDJci&%BJ(cOE52>36#=jUlnB1S+LIS2?Tegolgzt(okhD zU(DaGu+A{JW6h`R@3I4{~2L<ru$tbbQ(|(3JvFG$X@CUJsNZqJ0DZvH*6G@xv53AQiYolxZ@iWz8!lwrUPC5e%t^ z7q(5H`j;#jD?EI5g8FH$6!>zWC?mlrm4K;tZ-&(^Sn7{dj_bp=It)#r9K_;k4PnOW zjF*W(2zH+UJ$QT?o21v>xgP9RK-bh>zPpTa57^}kCOq&8qB*Qoc~AiUzKZ45V4eS~ zO1w<%;UAS)bJ1ige|(@THN@lOfqr>mh5VSKDlS8{L~h%VxofcR`W4k-*eApw4_(5( z{*Nzy22EjO3Qej~9aqx{jUvn^O#d zlYXn72f9#tV|Q$ATbtbEm)%LblluACMHpLcjYv?4rtkn5fYP2b)%(^b literal 0 HcmV?d00001 diff --git a/docs/en/api-reference/peripherals/sigmadelta.rst b/docs/en/api-reference/peripherals/sigmadelta.rst index 0352cc81bf..17d635d098 100644 --- a/docs/en/api-reference/peripherals/sigmadelta.rst +++ b/docs/en/api-reference/peripherals/sigmadelta.rst @@ -9,7 +9,13 @@ Introduction Functionality Overview ---------------------- -There are eight independent sigma-delta modulation channels identified with :cpp:type:`sigmadelta_channel_t`. Each channel is capable to output the binary, hardware generated signal with the sigma-delta modulation. +.. only:: esp32 or esp32s2 + + There are eight independent sigma-delta modulation channels identified with :cpp:type:`sigmadelta_channel_t`. Each channel is capable to output the binary, hardware generated signal with the sigma-delta modulation. + +.. only:: esp32c3 + + There are four independent sigma-delta modulation channels identified with :cpp:type:`sigmadelta_channel_t`. Each channel is capable to output the binary, hardware generated signal with the sigma-delta modulation. Selected channel should be set up by providing configuration parameters in :cpp:type:`sigmadelta_config_t` and then applying this configuration with :cpp:func:`sigmadelta_config`. @@ -21,6 +27,22 @@ Another option is to call individual functions, that will configure all required The range of the 'duty' input parameter of :cpp:func:`sigmadelta_set_duty` is from -128 to 127 (eight bit signed integer). If zero value is set, then the output signal's duty will be about 50%, see description of :cpp:func:`sigmadelta_set_duty`. + +Convert to analog signal (Optional) +----------------------------------- + +Typically, if the sigma-delta signal is connected to an LED, you don't have to add any filter between them (because our eyes are a low pass filter naturally). However, if you want to check the real voltage or watch the analog waveform, you need to design an analog low pass filter. Also, it is recommended to use an active filter instead of a passive filter to gain better isolation and not lose too much voltage. + +For example, you can take the following `Sallen-Key topology Low Pass Filter`_ as a reference. + +.. figure:: ../../../_static/typical_sallenkey_LP_filter.png + :align: center + :alt: Sallen-Key Low Pass Filter + :figclass: align-center + + Sallen-Key Low Pass Filter + + Application Example ------------------- @@ -31,3 +53,5 @@ API Reference .. include-build-file:: inc/sigmadelta.inc .. include-build-file:: inc/sigmadelta_types.inc + +.. _Sallen-Key topology Low Pass Filter: https://en.wikipedia.org/wiki/Sallen%E2%80%93Key_topology