From 482a26e284a40464fbed6c7635e76dcfba34fb69 Mon Sep 17 00:00:00 2001 From: laokaiyao Date: Mon, 9 Jan 2023 16:31:54 +0800 Subject: [PATCH] sdm: support sdm on esp32h2 --- components/driver/sdm.c | 12 +++- .../gpio_extensions/pytest_gpio_extensions.py | 3 +- components/hal/esp32h2/include/hal/sdm_ll.h | 58 ++++++++++++++++++ .../esp32h2/include/soc/Kconfig.soc_caps.in | 6 +- .../soc/esp32h2/include/soc/clk_tree_defs.h | 10 ++- .../soc/esp32h2/include/soc/gpio_ext_struct.h | 8 +-- components/soc/esp32h2/include/soc/soc_caps.h | 5 +- docs/en/api-reference/peripherals/sdm.rst | 3 +- .../peripherals/sigma_delta/sdm_dac/README.md | 14 ++--- .../sigma_delta/sdm_dac/example_figure.png | Bin 0 -> 10173 bytes .../sdm_dac/filtered_sine_wave.png | Bin 8984 -> 0 bytes .../sdm_dac/main/sdm_dac_example_main.c | 17 ++--- .../sdm_dac/pytest_sdm_dac_example.py | 1 + .../sigma_delta/sdm_dac/raw_sdm_output.png | Bin 9520 -> 0 bytes .../sdm_led/pytest_sdm_led_example.py | 1 + 15 files changed, 107 insertions(+), 31 deletions(-) create mode 100644 components/hal/esp32h2/include/hal/sdm_ll.h create mode 100644 examples/peripherals/sigma_delta/sdm_dac/example_figure.png delete mode 100644 examples/peripherals/sigma_delta/sdm_dac/filtered_sine_wave.png delete mode 100644 examples/peripherals/sigma_delta/sdm_dac/raw_sdm_output.png diff --git a/components/driver/sdm.c b/components/driver/sdm.c index 361e02574b..5609554fdf 100644 --- a/components/driver/sdm.c +++ b/components/driver/sdm.c @@ -232,9 +232,19 @@ esp_err_t sdm_new_channel(const sdm_config_t *config, sdm_channel_handle_t *ret_ sprintf(chan->pm_lock_name, "sdm_%d_%d", group->group_id, chan_id); // e.g. sdm_0_0 ret = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, chan->pm_lock_name, &chan->pm_lock); ESP_RETURN_ON_ERROR(ret, TAG, "create NO_LIGHT_SLEEP lock failed"); -#endif +#endif // CONFIG_PM_ENABLE break; #endif // SOC_SDM_CLK_SUPPORT_PLL_F80M +#if SOC_SDM_CLK_SUPPORT_PLL_F48M + case SDM_CLK_SRC_PLL_F48M: + src_clk_hz = 48 * 1000 * 1000; +#if CONFIG_PM_ENABLE + sprintf(chan->pm_lock_name, "sdm_%d_%d", group->group_id, chan_id); // e.g. sdm_0_0 + ret = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, chan->pm_lock_name, &chan->pm_lock); + ESP_RETURN_ON_ERROR(ret, TAG, "create NO_LIGHT_SLEEP lock failed"); +#endif // CONFIG_PM_ENABLE + break; +#endif // SOC_SDM_CLK_SUPPORT_PLL_F48M default: ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "clock source %d is not support", config->clk_src); break; diff --git a/components/driver/test_apps/gpio_extensions/pytest_gpio_extensions.py b/components/driver/test_apps/gpio_extensions/pytest_gpio_extensions.py index e245bb1993..b3e6d43994 100644 --- a/components/driver/test_apps/gpio_extensions/pytest_gpio_extensions.py +++ b/components/driver/test_apps/gpio_extensions/pytest_gpio_extensions.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest @@ -15,6 +15,7 @@ CONFIGS = [ @pytest.mark.esp32c6 @pytest.mark.esp32s2 @pytest.mark.esp32s3 +# @pytest.mark.esp32h2 // TODO: IDF-6263 @pytest.mark.generic @pytest.mark.parametrize('config', CONFIGS, indirect=True) def test_sdm(dut: IdfDut) -> None: diff --git a/components/hal/esp32h2/include/hal/sdm_ll.h b/components/hal/esp32h2/include/hal/sdm_ll.h new file mode 100644 index 0000000000..7bdad37119 --- /dev/null +++ b/components/hal/esp32h2/include/hal/sdm_ll.h @@ -0,0 +1,58 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include "hal/misc.h" +#include "hal/assert.h" +#include "soc/gpio_ext_struct.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Set Sigma-delta enable + * + * @param hw Peripheral SIGMADELTA hardware instance address. + * @param en Sigma-delta enable value + */ +static inline void sdm_ll_enable_clock(gpio_sd_dev_t *hw, bool en) +{ + hw->misc.function_clk_en = en; +} + +/** + * @brief Set Sigma-delta channel duty. + * + * @param hw Peripheral SIGMADELTA hardware instance address. + * @param channel Sigma-delta channel number + * @param density Sigma-delta quantized density of one channel, the value ranges from -128 to 127, recommended range is -90 ~ 90. + * The waveform is more like a random one in this range. + */ +__attribute__((always_inline)) +static inline void sdm_ll_set_pulse_density(gpio_sd_dev_t *hw, int channel, int8_t density) +{ + HAL_FORCE_MODIFY_U32_REG_FIELD(hw->channel[channel], duty, (uint32_t)density); +} + +/** + * @brief Set Sigma-delta channel's clock pre-scale value. + * + * @param hw Peripheral SIGMADELTA hardware instance address. + * @param channel Sigma-delta channel number + * @param prescale The divider of source clock, ranges from 1 to 256 + */ +static inline void sdm_ll_set_prescale(gpio_sd_dev_t *hw, int channel, uint32_t prescale) +{ + HAL_ASSERT(prescale && prescale <= 256); + HAL_FORCE_MODIFY_U32_REG_FIELD(hw->channel[channel], prescale, prescale - 1); +} + +#ifdef __cplusplus +} +#endif diff --git a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in index 206dcc6077..048f493392 100644 --- a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in @@ -35,6 +35,10 @@ config SOC_RTC_MEM_SUPPORTED bool default y +config SOC_SDM_SUPPORTED + bool + default y + config SOC_SYSTIMER_SUPPORTED bool default y @@ -531,7 +535,7 @@ config SOC_SDM_CHANNELS_PER_GROUP int default 4 -config SOC_SDM_CLK_SUPPORT_PLL_F80M +config SOC_SDM_CLK_SUPPORT_PLL_F48M bool default y diff --git a/components/soc/esp32h2/include/soc/clk_tree_defs.h b/components/soc/esp32h2/include/soc/clk_tree_defs.h index 0602e7f2ab..7175713248 100644 --- a/components/soc/esp32h2/include/soc/clk_tree_defs.h +++ b/components/soc/esp32h2/include/soc/clk_tree_defs.h @@ -330,9 +330,13 @@ typedef enum { * @brief Sigma Delta Modulator clock source */ typedef enum { - SDM_CLK_SRC_XTAL = SOC_MOD_CLK_XTAL, /*!< Select XTAL clock as the source clock */ - SDM_CLK_SRC_PLL_F48M = SOC_MOD_CLK_PLL_F48M, /*!< Select PLL_F48M clock as the source clock */ - SDM_CLK_SRC_DEFAULT = SOC_MOD_CLK_PLL_F48M, /*!< Select PLL_F48M clock as the default clock choice */ + SDM_CLK_SRC_XTAL = SOC_MOD_CLK_XTAL, /*!< Select XTAL clock as the source clock */ + SDM_CLK_SRC_PLL_F48M = SOC_MOD_CLK_PLL_F48M, /*!< Select PLL_F48M clock as the source clock */ +#if CONFIG_IDF_ENV_FPGA + SDM_CLK_SRC_DEFAULT = SOC_MOD_CLK_XTAL, /*!< Select XTAL as the default clock choice */ +#else + SDM_CLK_SRC_DEFAULT = SOC_MOD_CLK_PLL_F48M, /*!< Select PLL_F48M as the default clock choice */ +#endif } soc_periph_sdm_clk_src_t; //////////////////////////////////////////////////GPIO Glitch Filter//////////////////////////////////////////////////// diff --git a/components/soc/esp32h2/include/soc/gpio_ext_struct.h b/components/soc/esp32h2/include/soc/gpio_ext_struct.h index df1cc89370..5ee44e94ea 100644 --- a/components/soc/esp32h2/include/soc/gpio_ext_struct.h +++ b/components/soc/esp32h2/include/soc/gpio_ext_struct.h @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -16,11 +16,11 @@ extern "C" { */ typedef union { struct { - /** sd0_in : R/W; bitpos: [7:0]; default: 0; + /** duty : R/W; bitpos: [7:0]; default: 0; * This field is used to configure the duty cycle of sigma delta modulation output. */ uint32_t duty:8; - /** sd0_prescale : R/W; bitpos: [15:8]; default: 255; + /** prescale : R/W; bitpos: [15:8]; default: 255; * This field is used to set a divider value to divide APB clock. */ uint32_t prescale:8; @@ -272,7 +272,7 @@ typedef union { uint32_t val; } gpio_ext_version_reg_t; -typedef struct { +typedef struct gpio_sd_dev_t { volatile gpio_sigmadelta_chn_reg_t channel[4]; uint32_t reserved_010[4]; volatile gpio_sigmadelta_misc_reg_t misc; diff --git a/components/soc/esp32h2/include/soc/soc_caps.h b/components/soc/esp32h2/include/soc/soc_caps.h index 97d6dbf53a..d199e265b5 100644 --- a/components/soc/esp32h2/include/soc/soc_caps.h +++ b/components/soc/esp32h2/include/soc/soc_caps.h @@ -46,7 +46,7 @@ #define SOC_RTC_MEM_SUPPORTED 1 // #define SOC_I2S_SUPPORTED 1 // TODO: IDF-6219 // #define SOC_RMT_SUPPORTED 1 // TODO: IDF-6224 -// #define SOC_SDM_SUPPORTED 1 // TODO: IDF-6220 +#define SOC_SDM_SUPPORTED 1 // #define SOC_GPSPI_SUPPORTED 1 // TODO: IDF-6264 #define SOC_SYSTIMER_SUPPORTED 1 // #define SOC_SUPPORT_COEXISTENCE 1 // TODO: IDF-6416 @@ -294,11 +294,10 @@ #define SOC_SHA_SUPPORT_SHA224 (1) #define SOC_SHA_SUPPORT_SHA256 (1) -// TODO: IDF-6220 /*-------------------------- Sigma Delta Modulator CAPS -----------------*/ #define SOC_SDM_GROUPS 1U #define SOC_SDM_CHANNELS_PER_GROUP 4 -#define SOC_SDM_CLK_SUPPORT_PLL_F80M 1 +#define SOC_SDM_CLK_SUPPORT_PLL_F48M 1 #define SOC_SDM_CLK_SUPPORT_XTAL 1 // TODO: IDF-6245 (Copy from esp32c6, need check) diff --git a/docs/en/api-reference/peripherals/sdm.rst b/docs/en/api-reference/peripherals/sdm.rst index 2b7e9f07e0..1c72254f3d 100644 --- a/docs/en/api-reference/peripherals/sdm.rst +++ b/docs/en/api-reference/peripherals/sdm.rst @@ -128,7 +128,8 @@ For example, you can take the following `Sallen-Key topology Low Pass Filter`_ a Application Example ------------------- -* LED driven by a GPIO that is modulated with Sigma-Delta: :example:`peripherals/sigma_delta`. +* 100 Hz sine wave that is modulated with Sigma-Delta: :example:`peripherals/sigma_delta/sdm_dac`. +* LED driven by a GPIO that is modulated with Sigma-Delta: :example:`peripherals/sigma_delta/sdm_led`. API Reference ------------- diff --git a/examples/peripherals/sigma_delta/sdm_dac/README.md b/examples/peripherals/sigma_delta/sdm_dac/README.md index 424ad644d2..f9d59d889b 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/README.md +++ b/examples/peripherals/sigma_delta/sdm_dac/README.md @@ -5,7 +5,7 @@ (See the README.md file in the upper level 'examples' directory for more information about examples.) -This example uses the sigma-delta driver to generate modulated output on a GPIO. If you filter the output signal with an active or passive filter, you can get a 1 KHz sine wave. +This example uses the sigma-delta driver to generate modulated output on a GPIO. If you filter the output signal with an active or passive filter, you can get a 100 Hz sine wave. ## How to use example @@ -46,21 +46,17 @@ Once the upload is complete and the board is reset, the program should start run I (299) main_task: Calling app_main() I (309) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (309) sdm_dac: Sigma-delta output is attached to GPIO 0 -I (319) sdm_dac: Timer allocated with resolution 10000000 Hz -I (329) sdm_dac: Timer callback registered, interval 10 us +I (319) sdm_dac: Timer allocated with resolution 1000000 Hz +I (329) sdm_dac: Timer callback registered, interval 100 us I (329) sdm_dac: Timer enabled I (339) sdm_dac: Output start ``` After the output stated, you can monitor the output signal by an oscilloscope. -If you monitor on the GPIO directly, you can see the raw SDM output, it consists by square waves (i.e. pulse) with different density +If you monitor on the GPIO directly, you can see the raw SDM output, it consists of square waves (i.e. pulse) with different densities (see the blue wave in the figure), and if you monitor the signal after a low-pass filter, you can see the pulses are filtered into a sine wave already (see the yellow wave in the figure). -![raw_sdm_output](raw_sdm_output.png) - -If you monitor the signal after a low-pass filter, you can see the pulses are filtered into a sine wave already - -![filtered_sine_wave](filtered_sine_wave.png) +![example_figure](example_figure.png) ## Troubleshooting diff --git a/examples/peripherals/sigma_delta/sdm_dac/example_figure.png b/examples/peripherals/sigma_delta/sdm_dac/example_figure.png new file mode 100644 index 0000000000000000000000000000000000000000..f89e85b8f3cf87c5e57755de94d335971df09453 GIT binary patch literal 10173 zcmZWvXElFXhK+C_xDg-pax9F(aF8*5;**(c?z(%DTdy8KsRb zTB8!CEZIWy^CNJNr7^Pe*)fW3&5?Zr!n}LXU^zMKS_^9JdfVyyZ*DHno-SnyriC|8 ze6OT(fZ%24A^67Z$Yyf z3Yk%qp>h}{>U#3^c)9gyz#n-MBbFc9mbAK(L+Gslo)0IRj;JZd{?kgUh=^T!>XFvM%f48C(=se_>T$C~!x6&7D zc8Wo4FNx9y^$D;+@@{1y_wwL{Ha`%`xYk<6f6tScL|0YiN0IdhU}jge5lABn~XFb z07l}>2WQ4$(oOL(Gnw3>HSNmQc;{xfFf9vGJ(dW3Cfcm$rc0#liybl(QKY!LwV6Cy z$QUFfl1_IY-qWii!ge(%IB(W~E9wCRf`*b(0m-+}TUgfp@Ir$-cb{|029S_=4PZ~j zKtlQCP=7jrEWT*+xMnKWyfl-0lur<~rd3gQU;8VL)sR#42r4rNX`?xmAH&F{P!loF zsG!cYfK*XMuuBf3Y^^RWyxdbsLNSrIkkJs6$PO8H{%^gatvF;x5T@7cTdBOMB@V9w zz%C1XbB|)I6tS0p5bNPs#~%paemzFXEH=e%w^#<<(40SG!KuiDB9{dM9Y`z7({V=B zUjV(5l&H1!v+rl))@_+~1=%<8c{QX^wH0EdaIFn8q1_@1=+CvFUJn`bu{nQv{sFk}@(H4xr+yEFk#@eTgHa^X)J1dNDYEmj}q; z=77(0-<{=wLDU*Ez=({Fr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T4nlTOmi8=M~@Lq>OWO1W}GfDny*& bD!h2mnC=0|ttH&HJU~aoK)qJ=am4=sTUp#W literal 0 HcmV?d00001 diff --git a/examples/peripherals/sigma_delta/sdm_dac/filtered_sine_wave.png b/examples/peripherals/sigma_delta/sdm_dac/filtered_sine_wave.png deleted file mode 100644 index 9fd43f993a0bda31aff5240ab2c79e6127dd97aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8984 zcmdUVcQBm)+pes-M2!+%bixvykSx)b)rka4M2TLa_pInW+Ugb|O4LZO7Qt6i!nsDDyRd!v^WkZt{Hx=o zriO*DgQU%2A|jaK3qU0aL6$&SZ}`^$x`R&?{Lc(Sh>Wty;R)V8zIxvLQ@^i{6Yfvg z7=iHJhV9AfJ#Gk07)T_JFZiN19=1)wN}u$$~b}v%H9l7K^>&AvUw#h7J6wtx{;X z3c1Nu=nJVGLgsErJq{$&$SPmrsdeVxUfZHpuv{N{@XZ-c5g;q2=C8~uych|-`s=v_ zr=7m_zJ-^{GlHSOJ!)(mZP?c*TogxNj2W;8;$or0IK?+V>;1@4%_W;Qc*C+JC+`A@ z#u%Tk4&KQ|)e2BhVRxtVR9#6u`z@%ju|+(XkE3<5&;GjEq=xMDNl?L*r690^22u?%sqVJeVEE;UJ{q?lU=DBWW=`Wz? zdN2N~!WcCiN*qUY^E%sYWu~c_XQn21RyVYEs7W!mR;wmg@SnxDhf;rI`?$@B8VlW+ z*gcDep_;8N%C*RLcl=F-HXpaX7~4I|+{%->YOZl?h5hy9ZZij_*?VnrRuNe{&<&ba zL7FDt91fK_t1jDx#rhV7#mTi%*cpWh`*ya+`NU-`b6}j`fi>eYK3Le%0_F)bmLD~N zEeH%MRwuYnOL~?2s0dBCy94lK_so77WZg~_NphLnX{$UvF5~p9HHtHI4=|V{_0uIk z3fc4O`geoMnR(}844~y22G=}B;Jsr4BZ=S9KH#E4(Ac>u#G5Rh?&*(gVC*nNBqw-a zWOOS)IF}Mmbc=!VyY0C*HQc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Gr-Z}hpi0?k_pKQ4|Cto?2?MHr- zUbvnNx@@b#jFFF0bj4<&9X|6fTe7IG8+i0%#c$F>!YtV7v8nXzQ+6X2ej5ztvE=~P z1wEI~9WHHrb)++}xpS%d-Y2Z?n=|~| zChO^rSA%%aFM69CN!$cWcxReox33%+JeKdl5Y^juk-`Ja|D=}4+E_Hv2rM4nY!SK9 zYN;a4F^f(Gn_|dsyHWjx6F5tf^$y&y#0kiy+!LFl4*F2`-Gl{`P<|Hnz0U{^ zR_p!!Z}O+F5ZMk2VzTL{zVQ)gKMz%0!NUWL|Gf)P)qe->(lnrm+?bI}0;??^2CJy; zs%J6<_t)Lx2sblE)@q@1Y3;fbygwGAv2AH_(EvWgVKn1yzE3Z_4a_bZZ=Nj3m&m zB0y{n8#z+m5M0^^(@NX*8KkZ+e8WTH(QVfDi_h+Ki!s$({sSNflg2;-Olz|@j)8C@ zY7WdRUS4XuN>I(gtNr&p8$j_1Bx3=1Uzj=b4pFj{v6S3f4hxQE+BSUcC*zMQ)fe&^ z$&PJQV;Kod9!2K}ZkwwNWNR?4hR`ve)eS07 z7EH?QWMXJL*7jCBjn4a+e0Zdy@uBEuJ*dh?itOaFXR+a2B&v0tX3?=gBk7Yzz2)pYIgck`VRUpGQFZnU!KQjlj4j6dAi681D+ctB)Ps3vdHxt ztsO(^cf&F^LnN%Qd-6*5g4EpQ3(jOHG0a@Gb+9W#am zm{0A7ckUDda^*@kMVs69`RBf$hu2Omx`o92YFhooM diff --git a/examples/peripherals/sigma_delta/sdm_dac/main/sdm_dac_example_main.c b/examples/peripherals/sigma_delta/sdm_dac/main/sdm_dac_example_main.c index 657819e5f1..92413d6201 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/main/sdm_dac_example_main.c +++ b/examples/peripherals/sigma_delta/sdm_dac/main/sdm_dac_example_main.c @@ -11,15 +11,16 @@ #include "driver/sdm.h" #include "driver/gptimer.h" -#define EXAMPLE_SIGMA_DELTA_GPIO_NUM (0) // Select GPIO_NUM_0 as the sigma-delta output pin -#define EXAMPLE_OVER_SAMPLE_RATE (20 * 1000 * 1000) // 20 MHz over sample rate -#define EXAMPLE_TIMER_RESOLUTION (10 * 1000 * 1000) // 10 MHz timer counting resolution -#define EXAMPLE_CALLBACK_INTERVAL_US (10) // 10 us interval of each timer callback -#define EXAMPLE_ALARM_COUNT (EXAMPLE_CALLBACK_INTERVAL_US * (EXAMPLE_TIMER_RESOLUTION / 1000000)) -#define EXAMPLE_SINE_WAVE_FREQ_HZ (1000) // 1 KHz wave, adjust this value to decide the sine wave frequency -#define EXAMPLE_SINE_WAVE_AMPLITUDE (127.0f) // 1 ~ 127, adjust this value to decide the sine wave amplitude -#define EXAMPLE_SINE_WAVE_POINT_NUM (1000000 / (EXAMPLE_CALLBACK_INTERVAL_US * EXAMPLE_SINE_WAVE_FREQ_HZ)) +#define MHZ (1000000) #define CONST_PI (3.1416f) // Constant of PI, used for calculating the sine wave +#define EXAMPLE_SIGMA_DELTA_GPIO_NUM (0) // Select GPIO_NUM_0 as the sigma-delta output pin +#define EXAMPLE_OVER_SAMPLE_RATE (10 * MHZ) // 10 MHz over sample rate +#define EXAMPLE_TIMER_RESOLUTION (1 * MHZ) // 1 MHz timer counting resolution +#define EXAMPLE_CALLBACK_INTERVAL_US (100) // 100 us interval of each timer callback +#define EXAMPLE_ALARM_COUNT (EXAMPLE_CALLBACK_INTERVAL_US * (EXAMPLE_TIMER_RESOLUTION / MHZ)) +#define EXAMPLE_SINE_WAVE_FREQ_HZ (100) // 100 Hz sine wave, adjust this value to decide the sine wave frequency +#define EXAMPLE_SINE_WAVE_AMPLITUDE (127.0f) // 1 ~ 127, adjust this value to decide the sine wave amplitude +#define EXAMPLE_SINE_WAVE_POINT_NUM (MHZ / (EXAMPLE_CALLBACK_INTERVAL_US * EXAMPLE_SINE_WAVE_FREQ_HZ)) ESP_STATIC_ASSERT(EXAMPLE_SINE_WAVE_POINT_NUM > 1, "Sine wave frequency is too high"); ESP_STATIC_ASSERT(EXAMPLE_CALLBACK_INTERVAL_US >= 7, "Timer callback interval is too short"); diff --git a/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py b/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py index 6d9335cc93..8a7f378b7e 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py +++ b/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py @@ -10,6 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 @pytest.mark.esp32c6 +# @pytest.mark.esp32h2 // TODO: IDF-6263, IDF-6242 @pytest.mark.generic def test_sdm_dac_example(dut: Dut) -> None: dut.expect(r'sdm_dac: Sigma-delta output is attached to GPIO \w+') diff --git a/examples/peripherals/sigma_delta/sdm_dac/raw_sdm_output.png b/examples/peripherals/sigma_delta/sdm_dac/raw_sdm_output.png deleted file mode 100644 index 1ac85e522bfc315e0e62a2a62b4de1ec10546638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9520 zcmb_?cT^KyxA#m!K)O;5^`S@+L4_z%4Il_2Ql&(Sg%Sh-A@mjnLGb~lOE5A#6a@qo zBOUDYGIZ%EEmWmT{|4XpTi?BR-MiNPasyW>#Jp@jq3ObN%x zxW|VSKkZ~%UOr-T_=aG5)z8Igu~G8l2`0=vQu*+1CGxiAD{Z&zyK6+;fAJ0|yI{+> zYGhf^@M`omuATLtqVKZU`=H*YD}nxmhv?NVu`Hk8gDU==yDfKq-puHI^kb)oE=WtC}V=3ML3q2pp-0S=bqEknTO20W zurM%TpBQ$N1q-|Ys5g~2%L=3}@dFxVdW<+N8-;LB40L6t0t5RQ*)UT3138Q*uQ!Rl zuJu>4?EMmFsdJcA5_)N5Uy~?ELTOk8w&Luu(&{LbsUHb!ew+vh%)jXI(VK67&6zKQ z-|JgBO|FeNI_383c)x+bRBQB=yHS<}VwCpQPP_{(@tqwQx)+qW|C;wS0)z*jRtyz= zi!}N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3x-yy zd5;TF-Q%(B6`dGI;nxRg0Q}A3wJRqybSfL{`|fvG6!!AY9p;CL(jG`IC=e}t<SnoIG5NX`g$89Ea|=FxT&XFYRoIZaShvzPfOAWVS|*o8LnjL)>^j~|D53tQ==YZFJTpa`V>u^b?m*gZkIB82Wy$frux<9 z;Sf(Fas%M??z-n>6NK(Ex(u`k9E4R)BQ?6)>!7BN;f96X8?P#;=HX+){T!A^>anw1 zi^A*3f=Ex){4x`%b(62QPR_h`ym?2%C7zl7w9srJHom1cr~4OQw5<%|O2@Hm$a)@- zA9**I?z_=1aAz&Hu=@b4L3QWkA24C0kMi6#x&l%wF7K>+mCHTsJ`rIVdN&nmir!=) z`a2opkGn0pj(j8dg4L3je&O+zQsqr~cCwz?aSJzR<>M?$jWpH^x_jrKzIS_Wes>OP z7pY$SQ0f~z**kX{?04>C|EaYnBvGLCymy!BGK6~Pw=}>3f8op@ePFLYo%UNx?EuBJ wO(lH$VRLO;tTtiIDpQPTZzRy{_-oJRRaRnhxqcV&Bottvd+A(}_SL)p2UJdmwEzGB diff --git a/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py b/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py index 3d0e30df37..d6cdf3f11e 100644 --- a/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py +++ b/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py @@ -10,6 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 @pytest.mark.esp32c6 +# @pytest.mark.esp32h2 // TODO: IDF-6263 @pytest.mark.generic def test_sdm_led_example(dut: Dut) -> None: dut.expect_exact('sdm_led: Install sigma delta channel')