Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc: stm32l1: Add support for STM32 IWDG #22125

Merged
merged 2 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boards/arm/nucleo_l152re/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ The Zephyr nucleo_l152re board configuration supports the following hardware fea
+-----------+------------+-------------------------------------+
| EEPROM | on-chip | eeprom |
+-----------+------------+-------------------------------------+
| WATCHDOG | on-chip | independent watchdog |
+-----------+------------+-------------------------------------+

Other hardware features are not yet supported in this Zephyr port.

Expand Down
4 changes: 4 additions & 0 deletions boards/arm/nucleo_l152re/nucleo_l152re.dts
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@
&eeprom {
status = "okay";
};

&iwdg {
status = "okay";
};
1 change: 1 addition & 0 deletions boards/arm/nucleo_l152re/nucleo_l152re.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ supported:
- gpio
- i2c
- uart
- watchdog
7 changes: 7 additions & 0 deletions dts/arm/st/l1/stm32l1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@
};
};

iwdg: watchdog@40003000 {
compatible = "st,stm32-watchdog";
reg = <0x40003000 0x400>;
label = "IWDG";
status = "disabled";
};

wwdg: watchdog@40002c00 {
compatible = "st,stm32-window-watchdog";
reg = <0x40002C00 0x400>;
Expand Down
2 changes: 2 additions & 0 deletions soc/arm/st_stm32/stm32l1/dts_fixup.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
#define DT_SPI_2_CLOCK_BITS DT_ST_STM32_SPI_40003800_CLOCK_BITS
#define DT_SPI_2_CLOCK_BUS DT_ST_STM32_SPI_40003800_CLOCK_BUS

#define DT_WDT_0_NAME DT_INST_0_ST_STM32_WATCHDOG_LABEL

#define DT_WWDT_0_BASE_ADDRESS DT_INST_0_ST_STM32_WINDOW_WATCHDOG_BASE_ADDRESS
#define DT_WWDT_0_NAME DT_INST_0_ST_STM32_WINDOW_WATCHDOG_LABEL
#define DT_WWDT_0_IRQ DT_INST_0_ST_STM32_WINDOW_WATCHDOG_IRQ_0
Expand Down
4 changes: 4 additions & 0 deletions soc/arm/st_stm32/stm32l1/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
#include <stm32l1xx_ll_spi.h>
#endif

#ifdef CONFIG_IWDG_STM32
#include <stm32l1xx_ll_iwdg.h>
#endif

#ifdef CONFIG_WWDG_STM32
#include <stm32l1xx_ll_wwdg.h>
#endif
Expand Down