diff --git a/common/core/src/ux_system_initialize.c b/common/core/src/ux_system_initialize.c index a3e27c47..443ee9a4 100644 --- a/common/core/src/ux_system_initialize.c +++ b/common/core/src/ux_system_initialize.c @@ -261,6 +261,14 @@ ULONG pool_size; /* Other fields are kept zero. */ #endif +#if !defined(UX_STANDALONE) + + /* Create the Mutex object used by USBX to control critical sections. */ + status = _ux_system_mutex_create(&_ux_system -> ux_system_mutex, "ux_system_mutex"); + if(status != UX_SUCCESS) + return(UX_MUTEX_ERROR); +#endif + #ifdef UX_ENABLE_DEBUG_LOG /* Obtain memory for storing the debug log. */ @@ -277,14 +285,6 @@ ULONG pool_size; #endif -#if !defined(UX_STANDALONE) - - /* Create the Mutex object used by USBX to control critical sections. */ - status = _ux_system_mutex_create(&_ux_system -> ux_system_mutex, "ux_system_mutex"); - if(status != UX_SUCCESS) - return(UX_MUTEX_ERROR); -#endif - return(UX_SUCCESS); }