diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index 9ef891dbae..e5f4427586 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -288,7 +288,8 @@ static void gpio_stm32_set_exti_source(int port, int pin) #elif CONFIG_SOC_SERIES_STM32MP1X LL_EXTI_SetEXTISource(port, line); #elif defined(CONFIG_SOC_SERIES_STM32G0X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) LL_EXTI_SetEXTISource(port, line); #else LL_SYSCFG_SetEXTISource(port, line); @@ -306,7 +307,8 @@ static int gpio_stm32_get_exti_source(int pin) #elif CONFIG_SOC_SERIES_STM32MP1X port = LL_EXTI_GetEXTISource(line); #elif defined(CONFIG_SOC_SERIES_STM32G0X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) port = LL_EXTI_GetEXTISource(line); #else port = LL_SYSCFG_GetEXTISource(line); diff --git a/drivers/interrupt_controller/Kconfig.stm32 b/drivers/interrupt_controller/Kconfig.stm32 index 18b8c4aca4..c14b6aa2b6 100644 --- a/drivers/interrupt_controller/Kconfig.stm32 +++ b/drivers/interrupt_controller/Kconfig.stm32 @@ -72,7 +72,7 @@ config EXTI_STM32_EXTI4_IRQ_PRI help IRQ priority of EXTI4 interrupt -if SOC_SERIES_STM32MP1X || SOC_SERIES_STM32L5X +if SOC_SERIES_STM32MP1X || SOC_SERIES_STM32L5X || SOC_SERIES_STM32U5X config EXTI_STM32_EXTI5_IRQ_PRI int "EXTI5 IRQ priority" @@ -153,7 +153,7 @@ config EXTI_STM32_EXTI15_IRQ_PRI endif # SOC_SERIES_STM32MP1X -if SOC_SERIES_STM32MP1X!=y && SOC_SERIES_STM32L5X!=y +if SOC_SERIES_STM32MP1X!=y && SOC_SERIES_STM32L5X!=y && SOC_SERIES_STM32U5X!=y config EXTI_STM32_EXTI9_5_IRQ_PRI int "EXTI9:5 IRQ priority" diff --git a/drivers/interrupt_controller/intc_exti_stm32.c b/drivers/interrupt_controller/intc_exti_stm32.c index 3fe2f7486d..c0e72c2931 100644 --- a/drivers/interrupt_controller/intc_exti_stm32.c +++ b/drivers/interrupt_controller/intc_exti_stm32.c @@ -86,7 +86,8 @@ const IRQn_Type exti_irq_table[] = { 0xFF, TAMP_STAMP_IRQn, RTC_WKUP_IRQn, LPTIM1_IRQn }; #elif defined(CONFIG_SOC_SERIES_STM32MP1X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) const IRQn_Type exti_irq_table[] = { EXTI0_IRQn, EXTI1_IRQn, EXTI2_IRQn, EXTI3_IRQn, EXTI4_IRQn, EXTI5_IRQn, EXTI6_IRQn, EXTI7_IRQn, @@ -158,7 +159,8 @@ static inline int stm32_exti_is_pending(int line) if (line < 32) { #if defined(CONFIG_SOC_SERIES_STM32MP1X) || \ defined(CONFIG_SOC_SERIES_STM32G0X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) return (LL_EXTI_IsActiveRisingFlag_0_31(1 << line) || LL_EXTI_IsActiveFallingFlag_0_31(1 << line)); #elif defined(CONFIG_SOC_SERIES_STM32H7X) && defined(CONFIG_CPU_CORTEX_M4) @@ -182,7 +184,8 @@ static inline void stm32_exti_clear_pending(int line) if (line < 32) { #if defined(CONFIG_SOC_SERIES_STM32MP1X) || \ defined(CONFIG_SOC_SERIES_STM32G0X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) LL_EXTI_ClearRisingFlag_0_31(1 << line); LL_EXTI_ClearFallingFlag_0_31(1 << line); #elif defined(CONFIG_SOC_SERIES_STM32H7X) && defined(CONFIG_CPU_CORTEX_M4) @@ -303,7 +306,8 @@ static inline void __stm32_exti_isr_4(const void *arg) } #if defined(CONFIG_SOC_SERIES_STM32MP1X) || \ - defined(CONFIG_SOC_SERIES_STM32L5X) + defined(CONFIG_SOC_SERIES_STM32L5X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) static inline void __stm32_exti_isr_5(const void *arg) { __stm32_exti_isr(5, 6, arg); @@ -481,6 +485,7 @@ static void __stm32_exti_connect_irqs(const struct device *dev) defined(CONFIG_SOC_SERIES_STM32L4X) || \ defined(CONFIG_SOC_SERIES_STM32L5X) || \ defined(CONFIG_SOC_SERIES_STM32MP1X) || \ + defined(CONFIG_SOC_SERIES_STM32U5X) || \ defined(CONFIG_SOC_SERIES_STM32WBX) || \ defined(CONFIG_SOC_SERIES_STM32G4X) || \ defined(CONFIG_SOC_SERIES_STM32WLX) @@ -512,7 +517,8 @@ static void __stm32_exti_connect_irqs(const struct device *dev) __stm32_exti_isr_4, DEVICE_DT_GET(EXTI_NODE), 0); #if !defined(CONFIG_SOC_SERIES_STM32MP1X) && \ - !defined(CONFIG_SOC_SERIES_STM32L5X) + !defined(CONFIG_SOC_SERIES_STM32L5X) && \ + !defined(CONFIG_SOC_SERIES_STM32U5X) IRQ_CONNECT(EXTI9_5_IRQn, CONFIG_EXTI_STM32_EXTI9_5_IRQ_PRI, __stm32_exti_isr_9_5, DEVICE_DT_GET(EXTI_NODE),