File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ MBED_WEAK void TargetBSP_Init(void) {
94
94
/** Do nothing */
95
95
}
96
96
97
+ #if MBED_CONF_TARGET_GPIO_RESET_AT_INIT
97
98
void GPIO_Full_Init (void ) {
98
99
GPIO_InitTypeDef GPIO_InitStruct ;
99
100
@@ -160,6 +161,7 @@ void GPIO_Full_Init(void) {
160
161
__HAL_RCC_GPIOK_CLK_DISABLE ();
161
162
#endif
162
163
}
164
+ #endif
163
165
164
166
// This function is called after RAM initialization and before main.
165
167
void mbed_sdk_init ()
@@ -311,8 +313,10 @@ void mbed_sdk_init()
311
313
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */
312
314
#endif /* DEVICE_RTC */
313
315
316
+ #if MBED_CONF_TARGET_GPIO_RESET_AT_INIT
314
317
/* Reset all GPIO */
315
318
GPIO_Full_Init ();
319
+ #endif
316
320
317
321
/* BSP initialization hook (external RAM, etc) */
318
322
TargetBSP_Init ();
Original file line number Diff line number Diff line change 1157
1157
"lpticker_lptim_clock" : {
1158
1158
"help" : " Default value for LPTIM clock (lpticker_lptim == 1). Value is the dividing factor. Choose 1, 2 or 4" ,
1159
1159
"value" : 1
1160
+ },
1161
+ "gpio_reset_at_init" : {
1162
+ "help" : " if value set, all GPIO are reset during init" ,
1163
+ "value" : false
1160
1164
}
1161
1165
},
1162
1166
"overrides" : {
3285
3289
"macro_name" : " CLOCK_SOURCE"
3286
3290
}
3287
3291
},
3292
+ "overrides" : {
3293
+ "gpio_reset_at_init" : true
3294
+ },
3288
3295
"device_has_add" : [
3289
3296
" ANALOGOUT" ,
3290
3297
" SERIAL_ASYNCH" ,
You can’t perform that action at this time.
0 commit comments