only: wait until board has turned itself on

This commit is contained in:
rusefillc 2024-04-12 21:13:03 -04:00
parent e50df044f2
commit eaf2f7844f
1 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,7 @@ static int totalSyncCounter = 0;
#include "mmc_card.h"
#include "ff.h"
#include "mass_storage_init.h"
#include "hellen_meta.h"
#include "rtc_helper.h"
@ -527,6 +528,15 @@ static THD_FUNCTION(MMCmonThread, arg) {
(void)arg;
chRegSetThreadName("MMC Card Logger");
#if HW_HELLEN && EFI_PROD_CODE
// on mega-module we manage SD card power supply
while (!getHellenBoardEnabled()) {
// wait until board enables peripheral
chThdSleepMilliseconds(100);
}
chThdSleepMilliseconds(300);
#endif
if (!mountMmc()) {
// no card present (or mounted via USB), don't do internal logging
return;