diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c index 95c418da44..dd76bed375 100644 --- a/cc3200/mods/modwlan.c +++ b/cc3200/mods/modwlan.c @@ -379,6 +379,7 @@ void SimpleLinkSockEventHandler(SlSockEvent_t *pSock) { // SimpleLink Asynchronous Event Handlers -- End //***************************************************************************** +__attribute__ ((section (".boot"))) void wlan_init0 (void) { // create the wlan lock ASSERT(OSI_OK == sl_LockObjCreate(&wlan_LockObj, "WlanLock")); diff --git a/cc3200/mptask.c b/cc3200/mptask.c index d9c0ed8f7e..6d3ef825d7 100644 --- a/cc3200/mptask.c +++ b/cc3200/mptask.c @@ -126,7 +126,6 @@ soft_reset: pin_init0(); readline_init0(); mod_network_init0(); - wlan_init0(); #if MICROPY_HW_ENABLE_RNG rng_init0(); #endif @@ -273,6 +272,9 @@ STATIC void mptask_pre_init (void) { // this one allocates memory for the nvic vault pybsleep_pre_init(); + // this one allocates mameory for the WLAN semaphore + wlan_init0(); + #if MICROPY_HW_HAS_SDCARD pybsd_init0(); #endif