diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c b/targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c index fd28bc3e19..9b0cf3ae9f 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c +++ b/targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c @@ -22,6 +22,7 @@ #include "cybsp_core.h" #include "mbed_power_mgmt.h" #include "rtos_idle.h" +#include "us_ticker_api.h" #if defined(COMPONENT_SPM_MAILBOX) void mailbox_init(void); @@ -80,6 +81,11 @@ void mbed_sdk_init(void) #if !defined(TARGET_PSA) /* Set up the device based on configurator selections */ cybsp_init(); + /* + * Init the us Ticker here to avoid imposing on the limited stack space of the idle thread. + * This also allows the first call to sleep to occur faster. + */ + us_ticker_init(); #endif /* Enable global interrupts (disabled in CM4 startup assembly) */