Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.

pull/1469/head
Dean Camera 13 years ago
parent 8de8d7ab5a
commit 3ea356a720

@ -92,6 +92,13 @@ void SetupHardware(void)
Dataflash_Init(); Dataflash_Init();
USB_Init(); USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
} }

@ -117,6 +117,13 @@ void SetupHardware(void)
Dataflash_Init(); Dataflash_Init();
USB_Init(); USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
} }

@ -131,6 +131,13 @@ void SetupHardware(void)
Dataflash_Init(); Dataflash_Init();
USB_Init(); USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
} }

@ -80,6 +80,13 @@ void SetupHardware(void)
Dataflash_Init(); Dataflash_Init();
USB_Init(); USB_Init();
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
} }

@ -12,6 +12,7 @@
* - Added support for the BitWizard Multio and Big-Multio boards * - Added support for the BitWizard Multio and Big-Multio boards
* - Library Applications: * - Library Applications:
* - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices * - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
* - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
* *
* <b>Changed:</b> * <b>Changed:</b>
* - Core: * - Core:

@ -23,12 +23,6 @@ upgrade-doxygen:
done; done;
@echo Doxygen configuration update complete. @echo Doxygen configuration update complete.
# Validate the working branch - compile all documentation, demos/projects/examples and run build tests
validate-branch:
make -s -C $(LUFA_ROOT) doxygen
make -s -C $(LUFA_ROOT) all
make -s -C $(LUFA_ROOT)/BuildTests all
# Check the working branch documentation, ensure no placeholder values # Check the working branch documentation, ensure no placeholder values
check-documentation-placeholders: check-documentation-placeholders:
@echo Checking for release suitability... @echo Checking for release suitability...
@ -42,5 +36,11 @@ check-documentation-placeholders:
fi; fi;
@echo Done. @echo Done.
# Validate the working branch - compile all documentation, demos/projects/examples and run build tests
validate-branch:
make -s -C $(LUFA_ROOT) doxygen
make -s -C $(LUFA_ROOT) all
make -s -C $(LUFA_ROOT)/BuildTests all
# Validate the working branch for general release, check for placeholder documentation then build and test everything # Validate the working branch for general release, check for placeholder documentation then build and test everything
validate-release: check-documentation-placeholders validate-branch validate-release: check-documentation-placeholders validate-branch

@ -155,6 +155,13 @@ void SetupHardware(void)
Serial_CreateStream(NULL); Serial_CreateStream(NULL);
#if defined(USB_CAN_BE_DEVICE) #if defined(USB_CAN_BE_DEVICE)
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
#endif #endif

@ -207,6 +207,13 @@ void SetupHardware(void)
TCCR1B = (1 << WGM12) | (1 << CS12) | (1 << CS10); TCCR1B = (1 << WGM12) | (1 << CS12) | (1 << CS10);
TIMSK1 = (1 << OCIE1A); TIMSK1 = (1 << OCIE1A);
/* Check if the Dataflash is working, abort if not */
if (!(DataflashManager_CheckDataflashOperation()))
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
for(;;);
}
/* Clear Dataflash sector protections, if enabled */ /* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections(); DataflashManager_ResetDataflashProtections();
} }

Loading…
Cancel
Save