drivers: timer: handle the stm32u0 target
Configure the lptim to wake-up from sleep. Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
This commit is contained in:
parent
03bca9bae9
commit
888bde94be
@ -519,11 +519,9 @@ static int sys_clock_driver_init(void)
|
||||
/* the LPTIM clock freq is affected by the prescaler */
|
||||
LL_LPTIM_SetPrescaler(LPTIM, (__CLZ(__RBIT(lptim_clock_presc)) << LPTIM_CFGR_PRESC_Pos));
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32U5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32H5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32WBAX)
|
||||
LL_LPTIM_OC_SetPolarity(LPTIM, LL_LPTIM_CHANNEL_CH1,
|
||||
LL_LPTIM_OUTPUT_POLARITY_REGULAR);
|
||||
#if defined(CONFIG_SOC_SERIES_STM32U5X) || defined(CONFIG_SOC_SERIES_STM32H5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32WBAX) || defined(CONFIG_SOC_SERIES_STM32U0X)
|
||||
LL_LPTIM_OC_SetPolarity(LPTIM, LL_LPTIM_CHANNEL_CH1, LL_LPTIM_OUTPUT_POLARITY_REGULAR);
|
||||
#else
|
||||
LL_LPTIM_SetPolarity(LPTIM, LL_LPTIM_OUTPUT_POLARITY_REGULAR);
|
||||
#endif
|
||||
@ -533,9 +531,8 @@ static int sys_clock_driver_init(void)
|
||||
/* counting start is initiated by software */
|
||||
LL_LPTIM_TrigSw(LPTIM);
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32U5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32H5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32WBAX)
|
||||
#if defined(CONFIG_SOC_SERIES_STM32U5X) || defined(CONFIG_SOC_SERIES_STM32H5X) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32WBAX) || defined(CONFIG_SOC_SERIES_STM32U0X)
|
||||
/* Enable the LPTIM before proceeding with configuration */
|
||||
LL_LPTIM_Enable(LPTIM);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user