From b44599c4c7d71d1db1c6ff850a3c80716ec4b127 Mon Sep 17 00:00:00 2001 From: Eren Terzioglu Date: Mon, 18 Nov 2024 11:18:55 +0100 Subject: [PATCH] esp32[s2|s3]: Add qencoder defconfig --- .../esp32/boards/esp32-devkitc/index.rst | 10 ++++ .../esp32s2/boards/esp32s2-saola-1/index.rst | 10 ++++ .../esp32s3/boards/esp32s3-devkit/index.rst | 10 ++++ .../esp32-devkitc/configs/qencoder/defconfig | 57 ++++++++++++++++++ .../configs/qencoder/defconfig | 56 ++++++++++++++++++ .../esp32s3-devkit/configs/qencoder/defconfig | 59 +++++++++++++++++++ 6 files changed, 202 insertions(+) create mode 100644 boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig create mode 100644 boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig create mode 100644 boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig diff --git a/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst b/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst index c171e87bd4352..5943fd6b46037 100644 --- a/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst +++ b/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst @@ -761,6 +761,16 @@ To test it, just execute the ``pwm`` application:: pwm_main: starting output with frequency: 10000 duty: 00008000 pwm_main: stopping output +qencoder +--- + +This configuration demostrates the use of Quadrature Encoder connected to pins +GPIO10 and GPIO11. You can start measurement of pulses using the following +command (by default, it will open ``\dev\qe0`` device and print 20 samples +using 1 second delay):: + + nsh> qe + random ------ diff --git a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst index cf34262a675a5..edebe5a882040 100644 --- a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst +++ b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst @@ -312,6 +312,16 @@ ostest This is the NuttX test at apps/testing/ostest that is run against all new architecture ports to assure a correct implementation of the OS. +qencoder +--- + +This configuration demostrates the use of Quadrature Encoder connected to pins +GPIO10 and GPIO11. You can start measurement of pulses using the following +command (by default, it will open ``\dev\qe0`` device and print 20 samples +using 1 second delay):: + + nsh> qe + pwm ------ diff --git a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst index 0c22f2730a7f4..c41db6650b5b2 100644 --- a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst @@ -358,6 +358,16 @@ To test it, just run the ``oneshot`` example:: Waiting... Finished +qencoder +--- + +This configuration demostrates the use of Quadrature Encoder connected to pins +GPIO10 and GPIO11. You can start measurement of pulses using the following +command (by default, it will open ``\dev\qe0`` device and print 20 samples +using 1 second delay):: + + nsh> qe + pm ------- diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig new file mode 100644 index 0000000000000..af4672d768828 --- /dev/null +++ b/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig @@ -0,0 +1,57 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_ARCH_LEDS is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_ARCH="xtensa" +CONFIG_ARCH_BOARD="esp32-devkitc" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32_DEVKITC=y +CONFIG_ARCH_CHIP="esp32" +CONFIG_ARCH_CHIP_ESP32=y +CONFIG_ARCH_CHIP_ESP32WROVER=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH_XTENSA=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BUILTIN=y +CONFIG_ESP32_UART0=y +CONFIG_ESP_PCNT=y +CONFIG_ESP_PCNT_U0=y +CONFIG_ESP_PCNT_U0_CH0_EDGE_PIN=10 +CONFIG_ESP_PCNT_U0_CH1_LEVEL_PIN=11 +CONFIG_ESP_PCNT_U0_FILTER_EN=y +CONFIG_ESP_PCNT_U0_QE=y +CONFIG_EXAMPLES_QENCODER=y +CONFIG_EXAMPLES_QENCODER_DELAY=1000 +CONFIG_EXAMPLES_QENCODER_NSAMPLES=20 +CONFIG_FS_PROCFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=3072 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INIT_STACKSIZE=3072 +CONFIG_INTELHEX_BINARY=y +CONFIG_MM_REGIONS=3 +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_TIMERS=4 +CONFIG_RAM_SIZE=114688 +CONFIG_RAM_START=0x20000000 +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SENSORS=y +CONFIG_SENSORS_QENCODER=y +CONFIG_START_DAY=6 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2011 +CONFIG_SYSLOG_BUFFER=y +CONFIG_SYSTEM_NSH=y +CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig new file mode 100644 index 0000000000000..558396f08f6db --- /dev/null +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig @@ -0,0 +1,56 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_ARCH_LEDS is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_ARCH="xtensa" +CONFIG_ARCH_BOARD="esp32s2-saola-1" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32S2_SAOLA_1=y +CONFIG_ARCH_CHIP="esp32s2" +CONFIG_ARCH_CHIP_ESP32S2=y +CONFIG_ARCH_CHIP_ESP32S2WROVER=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH_XTENSA=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BUILTIN=y +CONFIG_ESP32S2_UART0=y +CONFIG_ESP_PCNT=y +CONFIG_ESP_PCNT_U0=y +CONFIG_ESP_PCNT_U0_CH0_EDGE_PIN=10 +CONFIG_ESP_PCNT_U0_CH1_LEVEL_PIN=11 +CONFIG_ESP_PCNT_U0_FILTER_EN=y +CONFIG_ESP_PCNT_U0_QE=y +CONFIG_EXAMPLES_QENCODER=y +CONFIG_EXAMPLES_QENCODER_DELAY=1000 +CONFIG_EXAMPLES_QENCODER_NSAMPLES=20 +CONFIG_FS_PROCFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=3072 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INIT_STACKSIZE=3072 +CONFIG_INTELHEX_BINARY=y +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_TIMERS=4 +CONFIG_RAM_SIZE=114688 +CONFIG_RAM_START=0x20000000 +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SENSORS=y +CONFIG_SENSORS_QENCODER=y +CONFIG_START_DAY=6 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2011 +CONFIG_SYSLOG_BUFFER=y +CONFIG_SYSTEM_NSH=y +CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig new file mode 100644 index 0000000000000..039cfee7b717f --- /dev/null +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig @@ -0,0 +1,59 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_ARCH_LEDS is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_ARCH="xtensa" +CONFIG_ARCH_BOARD="esp32s3-devkit" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32S3_DEVKIT=y +CONFIG_ARCH_CHIP="esp32s3" +CONFIG_ARCH_CHIP_ESP32S3=y +CONFIG_ARCH_CHIP_ESP32S3WROOM1N4=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARCH_XTENSA=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BUILTIN=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_ESP32S3_UART0=y +CONFIG_ESP_PCNT=y +CONFIG_ESP_PCNT_U0=y +CONFIG_ESP_PCNT_U0_CH0_EDGE_PIN=10 +CONFIG_ESP_PCNT_U0_CH1_LEVEL_PIN=11 +CONFIG_ESP_PCNT_U0_FILTER_EN=y +CONFIG_ESP_PCNT_U0_QE=y +CONFIG_EXAMPLES_QENCODER=y +CONFIG_EXAMPLES_QENCODER_DELAY=1000 +CONFIG_EXAMPLES_QENCODER_NSAMPLES=20 +CONFIG_FS_PROCFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=3072 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INIT_STACKSIZE=3072 +CONFIG_INTELHEX_BINARY=y +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_TIMERS=4 +CONFIG_RAM_SIZE=114688 +CONFIG_RAM_START=0x20000000 +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SENSORS=y +CONFIG_SENSORS_QENCODER=y +CONFIG_START_DAY=6 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2011 +CONFIG_SYSLOG_BUFFER=y +CONFIG_SYSTEM_NSH=y +CONFIG_UART0_SERIAL_CONSOLE=y