drivers: stm32_lptim_timer: add support for STM32WL series
Add the lptim1 device node definition and enable the corresponding exti interrupt in sys_clock_driver_init(). Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
This commit is contained in:
parent
5d55730cf6
commit
9c82898127
2 changed files with 17 additions and 0 deletions
|
@ -128,6 +128,11 @@ int sys_clock_driver_init(const struct device *dev)
|
|||
lptim_irq_handler, 0, 0);
|
||||
irq_enable(DT_IRQN(DT_NODELABEL(lptim1)));
|
||||
|
||||
#ifdef CONFIG_SOC_SERIES_STM32WLX
|
||||
/* Enable the LPTIM1 wakeup EXTI line */
|
||||
LL_EXTI_EnableIT_0_31(LL_EXTI_LINE_29);
|
||||
#endif
|
||||
|
||||
/* configure the LPTIM1 counter */
|
||||
LL_LPTIM_SetClockSource(LPTIM1, LL_LPTIM_CLK_SOURCE_INTERNAL);
|
||||
/* configure the LPTIM1 prescaler with 1 */
|
||||
|
|
|
@ -151,6 +151,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
lptim1: timers@40007c00 {
|
||||
compatible = "st,stm32-lptim";
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x40007c00 0x400>;
|
||||
interrupts = <39 0>;
|
||||
interrupt-names = "wakeup";
|
||||
status = "disabled";
|
||||
label = "LPTIM_1";
|
||||
};
|
||||
|
||||
rtc: rtc@40002800 {
|
||||
compatible = "st,stm32-rtc";
|
||||
reg = <0x40002800 0x400>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue