Open stccff opened 1 year ago
Thanks for reporting. esp32-s3 doesn't support this hardware feature. But you can use another simplified filter "gpio_new_pin_glitch_filter" on esp32s3. https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/gpio.html#gpio-glitch-filter
From the esp32c3 api I also thought I could use the flex glitch filter, but I get the same linker error as above. Idf can try to compile gpio_flex_glitch_filter.c if I add set(CONFIG_SOC_GPIO_FLEX_GLITCH_FILTER NUM 1)
to my CMakeLists.txt. Then I get another error saying that the "hal/gpio_glitch_filter_ll.h" is only for esp32c6 or esp32h2.
(A) The documentation could be improved by having the following part of gpio.rst show up even with IDF_TARGET_FLEX_GLITCH_FILTER_NUM==0
:
{IDF_TARGET_NAME} provides {IDF_TARGET_FLEX_GLITCH_FILTER_NUM} flexible glitch filters, whose duration is configurable. We refer to this kind of filter as
flex flitch filter
. Each of them can be applied to any input GPIO. However, applying multiple filters to the same GPIO does not make difference from one. You can create the filter handle by calling :cpp:func:gpio_new_flex_glitch_filter
. All the configurations for a flexible glitch filter are listed in the :cpp:type:gpio_flex_glitch_filter_config_t
structure.
Or (B) conditionally remove gpio_new_flex_glitch_filter from the documentation. I think it should still be in the header, but perhaps it can have a pragma/attribute saying that the current target has no flex glitch filter. Either option would be better than the current linker error.
Answers checklist.
IDF version.
v5.1
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
build success
What is the actual behavior?
undefined reference to `gpio_new_flex_glitch_filter'![image](https://github.com/espressif/esp-idf/assets/44131757/a9b67eb6-1315-4857-81b4-d0a0a12e88b4)
Steps to reproduce.
Build or installation Logs.
More Information.
No response