File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
99
99
if (! wdt_hw_inited ) {
100
100
wdt_hw_inited = 1 ;
101
101
102
+ SYS_UnlockReg ();
103
+
102
104
/* Enable IP module clock */
103
105
CLK_EnableModuleClock (WDT_MODULE );
104
106
@@ -109,6 +111,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
109
111
CLK_SetModuleClock (WDT_MODULE , CLK_CLKSEL1_WDTSEL_LIRC , 0 );
110
112
#endif
111
113
114
+ SYS_LockReg ();
115
+
112
116
/* Set up IP interrupt */
113
117
NVIC_SetVector (WDT_IRQn , (uint32_t ) WDT_IRQHandler );
114
118
NVIC_EnableIRQ (WDT_IRQn );
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
100
100
if (! wdt_hw_inited ) {
101
101
wdt_hw_inited = 1 ;
102
102
103
+ SYS_UnlockReg ();
104
+
103
105
/* Enable IP module clock */
104
106
CLK_EnableModuleClock (WDT_MODULE );
105
107
@@ -110,6 +112,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
110
112
CLK_SetModuleClock (WDT_MODULE , CLK_CLKSEL1_WDTSEL_LIRC , 0 );
111
113
#endif
112
114
115
+ SYS_LockReg ();
116
+
113
117
/* Set up IP interrupt */
114
118
NVIC_SetVector (WDT_IRQn , (uint32_t ) WDT_IRQHandler );
115
119
NVIC_EnableIRQ (WDT_IRQn );
Original file line number Diff line number Diff line change @@ -101,12 +101,16 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
101
101
if (! wdt_hw_inited ) {
102
102
wdt_hw_inited = 1 ;
103
103
104
+ SYS_UnlockReg ();
105
+
104
106
/* Enable IP module clock */
105
107
CLK_EnableModuleClock (WDT_MODULE );
106
108
107
109
/* Select IP clock source */
108
110
CLK_SetModuleClock (WDT_MODULE , 0 , 0 );
109
111
112
+ SYS_LockReg ();
113
+
110
114
/* Set up IP interrupt */
111
115
NVIC_SetVector (WDT_IRQn , (uint32_t ) WDT_IRQHandler );
112
116
NVIC_EnableIRQ (WDT_IRQn );
Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
98
98
if (! wdt_hw_inited ) {
99
99
wdt_hw_inited = 1 ;
100
100
101
+ SYS_UnlockReg ();
102
+
101
103
/* Enable IP module clock */
102
104
CLK_EnableModuleClock (WDT_MODULE );
103
105
@@ -108,6 +110,8 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
108
110
CLK_SetModuleClock (WDT_MODULE , CLK_CLKSEL1_WDTSEL_LIRC , 0 );
109
111
#endif
110
112
113
+ SYS_LockReg ();
114
+
111
115
/* Set up IP interrupt */
112
116
NVIC_SetVector (WDT_IRQn , (uint32_t ) WDT_IRQHandler );
113
117
NVIC_EnableIRQ (WDT_IRQn );
You can’t perform that action at this time.
0 commit comments