From af598b3f3ebe85ed9077e069317579bbf757142b Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Sun, 21 Aug 2011 18:45:23 +0200 Subject: [PATCH] Fix random dataflash corruption in usb mass storage mode. Problem was that usbmsc does spi from the irq, and the queue() also does spi. And of course spi is non-reentrant. Fix this by disabling the queue here. For now. --- firmware/applications/final/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/applications/final/util.c b/firmware/applications/final/util.c index a3c8c10..268ea33 100644 --- a/firmware/applications/final/util.c +++ b/firmware/applications/final/util.c @@ -24,7 +24,7 @@ void msc_menu(void){ lcdPrintln("MSC Enabled."); lcdRefresh(); usbMSCInit(); - while(!getInputRaw())delayms_queue(10); + while(!getInputRaw())delayms(10); DoString(0,16,"MSC Disabled."); usbMSCOff(); fsReInit();