Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.
This commit is contained in:
parent
8de8d7ab5a
commit
3ea356a720
8 changed files with 50 additions and 7 deletions
|
@ -207,6 +207,13 @@ void SetupHardware(void)
|
|||
TCCR1B = (1 << WGM12) | (1 << CS12) | (1 << CS10);
|
||||
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 */
|
||||
DataflashManager_ResetDataflashProtections();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue