Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize mem sub system before decks #1252

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/src/crtp_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ static void memTask(void* param) {
// there might be late arrivals for the registration that will
// trigger assert.

systemWaitStart();

// Do not allow registration of new handlers after this point as clients now can start
// to query for available memories
memBlockHandlerRegistration();
Expand Down
6 changes: 5 additions & 1 deletion src/modules/src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void systemTask(void *arg)
// This should probably be done later, but deckInit() takes a long time if this is done later.
uartslkEnableIncoming();

memInit();
deckInit();
estimator = deckGetRequiredEstimator();
stabilizerInit(estimator);
Expand All @@ -217,7 +218,6 @@ void systemTask(void *arg)
platformSetLowInterferenceRadioMode();
}
soundInit();
memInit();
crtpMemInit();

#ifdef PROXIMITY_ENABLED
Expand Down Expand Up @@ -279,6 +279,10 @@ void systemTask(void *arg)
pass = false;
DEBUG_PRINT("mem [FAIL]\n");
}
if (crtpMemTest() == false) {
pass = false;
DEBUG_PRINT("CRTP mem [FAIL]\n");
}
if (watchdogNormalStartTest() == false) {
pass = false;
DEBUG_PRINT("watchdogNormalStart [FAIL]\n");
Expand Down