mirror of https://github.com/ARMmbed/mbed-os.git
STM32: RESET GPIO during init is configurable
Default value is disabledpull/14032/head
parent
9c0cfa9a44
commit
d689e90917
|
@ -94,6 +94,7 @@ MBED_WEAK void TargetBSP_Init(void) {
|
||||||
/** Do nothing */
|
/** Do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MBED_CONF_TARGET_GPIO_RESET_AT_INIT
|
||||||
void GPIO_Full_Init(void) {
|
void GPIO_Full_Init(void) {
|
||||||
GPIO_InitTypeDef GPIO_InitStruct;
|
GPIO_InitTypeDef GPIO_InitStruct;
|
||||||
|
|
||||||
|
@ -160,6 +161,7 @@ void GPIO_Full_Init(void) {
|
||||||
__HAL_RCC_GPIOK_CLK_DISABLE();
|
__HAL_RCC_GPIOK_CLK_DISABLE();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// This function is called after RAM initialization and before main.
|
// This function is called after RAM initialization and before main.
|
||||||
void mbed_sdk_init()
|
void mbed_sdk_init()
|
||||||
|
@ -309,8 +311,10 @@ void mbed_sdk_init()
|
||||||
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */
|
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */
|
||||||
#endif /* DEVICE_RTC */
|
#endif /* DEVICE_RTC */
|
||||||
|
|
||||||
|
#if MBED_CONF_TARGET_GPIO_RESET_AT_INIT
|
||||||
/* Reset all GPIO */
|
/* Reset all GPIO */
|
||||||
GPIO_Full_Init();
|
GPIO_Full_Init();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* BSP initialization hook (external RAM, etc) */
|
/* BSP initialization hook (external RAM, etc) */
|
||||||
TargetBSP_Init();
|
TargetBSP_Init();
|
||||||
|
|
|
@ -1157,6 +1157,10 @@
|
||||||
"lpticker_lptim_clock": {
|
"lpticker_lptim_clock": {
|
||||||
"help": "Default value for LPTIM clock (lpticker_lptim == 1). Value is the dividing factor. Choose 1, 2 or 4",
|
"help": "Default value for LPTIM clock (lpticker_lptim == 1). Value is the dividing factor. Choose 1, 2 or 4",
|
||||||
"value": 1
|
"value": 1
|
||||||
|
},
|
||||||
|
"gpio_reset_at_init": {
|
||||||
|
"help": "if value set, all GPIO are reset during init",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
@ -3200,6 +3204,9 @@
|
||||||
"macro_name": "CLOCK_SOURCE"
|
"macro_name": "CLOCK_SOURCE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"gpio_reset_at_init": true
|
||||||
|
},
|
||||||
"device_has_add": [
|
"device_has_add": [
|
||||||
"ANALOGOUT",
|
"ANALOGOUT",
|
||||||
"SERIAL_ASYNCH",
|
"SERIAL_ASYNCH",
|
||||||
|
|
Loading…
Reference in New Issue