Added support for STM32G47XXX devices.

This commit is contained in:
Daniel P. Carvalho 2024-06-26 10:34:19 -03:00 committed by Mateusz Szafoni
parent fa80408a06
commit 9f69652835
3 changed files with 2491 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -39,9 +39,9 @@
#if defined(CONFIG_STM32_HRTIM1)
/* Only STM32F33XXX */
/* Only STM32F33XXX and STM32G47XXX */
#if defined(CONFIG_STM32_STM32F33XX)
#if defined(CONFIG_STM32_STM32F33XX) || defined(CONFIG_STM32_STM32G47XX)
#if defined(CONFIG_STM32_HRTIM_TIMA_PWM) || defined(CONFIG_STM32_HRTIM_TIMA_DAC) || \
defined(CONFIG_STM32_HRTIM_TIMA_CAP) || defined(CONFIG_STM32_HRTIM_TIMA_IRQ) || \
@ -6017,5 +6017,5 @@ int hrtim_register(const char *path, struct hrtim_dev_s *dev)
}
#endif /* CONFIG_STM32_HRTIM_DISABLE_CHARDRV */
#endif /* CONFIG_STM32_STM32F33XX */
#endif /* CONFIG_STM32_STM32F33XX || CONFIG_STM32_STM32G47XX */
#endif /* CONFIG_STM32_HRTIM1 */

View File

@ -36,6 +36,9 @@
#if defined(CONFIG_STM32_STM32F33XX)
# include "hardware/stm32f33xxx_hrtim.h"
# include "hardware/stm32f33xxx_rcc.h"
#elif defined(CONFIG_STM32_STM32G47XX)
# include "hardware/stm32g47xxx_hrtim.h"
# include "hardware/stm32g4xxxx_rcc.h"
#else
# error
#endif
@ -178,11 +181,11 @@
# error "Clock system must be set to PLL"
# endif
#else
# error "Not supported yet: system freezes when no PLL selected."
# define HRTIM_HAVE_CLK_FROM_APB2 1
# if STM32_RCC_CFGR_PPRE2 == RCC_CFGR_PPRE2_HCLK
# define HRTIM_MAIN_CLOCK STM32_PCLK2_FREQUENCY
# else
# error "Not supported yet."
# define HRTIM_MAIN_CLOCK 2*STM32_PCLK2_FREQUENCY
# endif
#endif