Skip to content

Commit 9315381

Browse files
author
Seppo Takalo
committed
Allow specifying a startup delay before initializing storage hardware.
1 parent af377d6 commit 9315381

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
"help": "bootloader size",
4242
"value": "(32*1024)",
4343
"macro_name": "MBED_BOOTLOADER_SIZE"
44+
},
45+
"startup-delay": {
46+
"help": "Startup delay before initializing the storage hardware. (In milliseconds)",
47+
"value": 0
4448
}
4549
},
4650
"macros": [

source/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ int main(void)
6161
mbed_trace_print_function_set(boot_debug);
6262
#endif // MBED_CONF_MBED_TRACE_ENABLE
6363

64+
#if MBED_CONF_MBED_BOOTLOADER_STARTUP_DELAY
65+
ThisThread::sleep_for(MBED_CONF_MBED_BOOTLOADER_STARTUP_DELAY);
66+
#endif // MBED_CONF_MBED_BOOTLOADER_STARTUP_DELAY
67+
6468
/* Initialize PAL */
6569
arm_uc_error_t ucp_result = MBED_CLOUD_CLIENT_UPDATE_STORAGE.Initialize(arm_ucp_event_handler);
6670
if (ucp_result.error != ERR_NONE) {

0 commit comments

Comments
 (0)