File tree 5 files changed +37
-6
lines changed
5 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 121
121
#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
122
122
#endif /* HSI_VALUE */
123
123
124
+ /**
125
+ * @brief Internal Low Speed oscillator (LSI) value.
126
+ */
127
+ #if !defined (LSI_VALUE )
128
+ #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
129
+ #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
130
+ The real value may vary depending on the variations
131
+ in voltage and temperature. */
132
+
124
133
/**
125
134
* @brief External Low Speed oscillator (LSE) value.
126
135
* This value is used by the UART, RTC HAL module to compute the system frequency
Original file line number Diff line number Diff line change 109
109
/** @defgroup IWDG_Private_Defines IWDG Private Defines
110
110
* @{
111
111
*/
112
- /* Status register need 5 RC LSI divided by prescaler clock to be updated. With
113
- higher prescaler (256), and according to LSI variation, we need to wait at
114
- least 6 cycles so 48 ms. */
115
- #define HAL_IWDG_DEFAULT_TIMEOUT 48u
112
+ /* MBED */
113
+ #define HAL_IWDG_DEFAULT_TIMEOUT 96u
116
114
/**
117
115
* @}
118
116
*/
Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ struct can_s {
170
170
#define RCC_LPUART1CLKSOURCE_PCLK1 RCC_LPUART1CLKSOURCE_PLL2
171
171
#define RCC_LPUART1CLKSOURCE_SYSCLK RCC_LPUART1CLKSOURCE_D3PCLK1
172
172
173
+ /* watchdog_api.c */
174
+ #define IWDG IWDG1
175
+
173
176
#ifdef __cplusplus
174
177
}
175
178
#endif
Original file line number Diff line number Diff line change @@ -27,18 +27,36 @@ reset_reason_t hal_reset_reason_get(void)
27
27
}
28
28
#endif
29
29
30
+ #ifdef RCC_FLAG_LPWR1RST
31
+ if ((__HAL_RCC_GET_FLAG (RCC_FLAG_LPWR1RST ))|| (__HAL_RCC_GET_FLAG (RCC_FLAG_LPWR2RST ))) {
32
+ return RESET_REASON_WAKE_LOW_POWER ;
33
+ }
34
+ #endif
35
+
30
36
#ifdef RCC_FLAG_WWDGRST
31
37
if (__HAL_RCC_GET_FLAG (RCC_FLAG_WWDGRST )) {
32
38
return RESET_REASON_WATCHDOG ;
33
39
}
34
40
#endif
35
41
42
+ #ifdef RCC_FLAG_WWDG1RST
43
+ if (__HAL_RCC_GET_FLAG (RCC_FLAG_WWDG1RST )) {
44
+ return RESET_REASON_WATCHDOG ;
45
+ }
46
+ #endif
47
+
36
48
#ifdef RCC_FLAG_IWDGRST
37
49
if (__HAL_RCC_GET_FLAG (RCC_FLAG_IWDGRST )) {
38
50
return RESET_REASON_WATCHDOG ;
39
51
}
40
52
#endif
41
53
54
+ #ifdef RCC_FLAG_IWDG1RST
55
+ if (__HAL_RCC_GET_FLAG (RCC_FLAG_IWDG1RST )) {
56
+ return RESET_REASON_WATCHDOG ;
57
+ }
58
+ #endif
59
+
42
60
#ifdef RCC_FLAG_SFTRST
43
61
if (__HAL_RCC_GET_FLAG (RCC_FLAG_SFTRST )) {
44
62
return RESET_REASON_SOFTWARE ;
@@ -69,7 +87,11 @@ reset_reason_t hal_reset_reason_get(void)
69
87
70
88
uint32_t hal_reset_reason_get_raw (void )
71
89
{
90
+ #if TARGET_STM32H7
91
+ return RCC -> RSR ;
92
+ #else /* TARGET_STM32H7 */
72
93
return RCC -> CSR ;
94
+ #endif /* TARGET_STM32H7 */
73
95
}
74
96
75
97
Original file line number Diff line number Diff line change 3227
3227
],
3228
3228
"release_versions" : [" 2" , " 5" ],
3229
3229
"device_name" : " STM32H743ZI" ,
3230
- "bootloader_supported" : true ,
3231
- "device_has_remove" : [" WATCHDOG" ]
3230
+ "bootloader_supported" : true
3232
3231
},
3233
3232
"NUCLEO_H743ZI2" : {
3234
3233
"inherits" : [" NUCLEO_H743ZI" ],
You can’t perform that action at this time.
0 commit comments