Skip to content

Commit

Permalink
drivers/gpio: stm32: Fix for stm32u5 support
Browse files Browse the repository at this point in the history
W/o this fix issues could be seen on pins higher than 8

Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and nashif committed Sep 1, 2021
1 parent 013a54e commit b14a3cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpio_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ static inline uint32_t gpio_stm32_pin_to_exti_line(int pin)
#elif defined(CONFIG_SOC_SERIES_STM32MP1X)
return (((pin * 8) % 32) << 16) | (pin / 4);
#elif defined(CONFIG_SOC_SERIES_STM32G0X) || \
defined(CONFIG_SOC_SERIES_STM32L5X)
defined(CONFIG_SOC_SERIES_STM32L5X) || \
defined(CONFIG_SOC_SERIES_STM32U5X)
return ((pin & 0x3) << (16 + 3)) | (pin >> 2);
#else
return (0xF << ((pin % 4 * 4) + 16)) | (pin / 4);
Expand Down

0 comments on commit b14a3cb

Please sign in to comment.