Skip to content

Commit

Permalink
xtensa/esp32s3: Add support for Timer Groups 0 and 1
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Henrique Nihei <[email protected]>
  • Loading branch information
gustavonihei authored and pull[bot] committed Aug 4, 2023
1 parent 8cf8857 commit 1309501
Show file tree
Hide file tree
Showing 7 changed files with 2,780 additions and 1 deletion.
34 changes: 33 additions & 1 deletion arch/xtensa/src/esp32s3/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ config ESP32S3_UART
bool
default n

config ESP32S3_TIMER
bool
default n

config ESP32S3_UART0
bool "UART 0"
default n
Expand All @@ -323,7 +327,35 @@ config ESP32S3_UART2
select UART2_SERIALDRIVER
select ARCH_HAVE_SERIAL_TERMIOS

endmenu # ESP32S3 Peripheral Selection
config ESP32S3_TIMER0
bool "54-bit Timer 0 (Group 0 Timer 0)"
default n
select ESP32S3_TIMER
---help---
Enables Timer 0

config ESP32S3_TIMER1
bool "54-bit Timer 1 (Group 0 Timer 1)"
default n
select ESP32S3_TIMER
---help---
Enables Timer 1

config ESP32S3_TIMER2
bool "54-bit Timer 2 (Group 1 Timer 0)"
default n
select ESP32S3_TIMER
---help---
Enables Timer 2

config ESP32S3_TIMER3
bool "54-bit Timer 3 (Group 1 Timer 1)"
default n
select ESP32S3_TIMER
---help---
Enables Timer 3

endmenu # ESP32-S3 Peripheral Selection

menu "UART configuration"
depends on ESP32S3_UART
Expand Down
7 changes: 7 additions & 0 deletions arch/xtensa/src/esp32s3/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ CHIP_CSRCS += esp32s3_systemreset.c
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
CHIP_CSRCS += esp32s3_idle.c
endif

ifeq ($(CONFIG_ESP32S3_TIMER),y)
CHIP_CSRCS += esp32s3_tim.c
ifeq ($(CONFIG_TIMER),y)
CHIP_CSRCS += esp32s3_tim_lowerhalf.c
endif
endif
Loading

0 comments on commit 1309501

Please sign in to comment.