modified write command to wait until card isn't busy anymore
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.500844171">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.500844171" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
@@ -57,7 +55,6 @@
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@@ -118,6 +115,9 @@
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <MCF5475.h>
|
||||
#include "sysinit.h"
|
||||
#include <bas_printf.h>
|
||||
|
||||
#define FPGA_STATUS (1 << 0)
|
||||
#define FPGA_CLOCK (1 << 1)
|
||||
|
||||
@@ -251,6 +251,13 @@ static int rcvr_datablock(uint8_t *buff, uint32_t btr)
|
||||
token = xchg_spi(0xFF, 0);
|
||||
/* This loop will take a time. Insert rot_rdq() here for multitask environment. */
|
||||
} while ((token == 0xFF) && MCF_SLT_SCNT(0) > target);
|
||||
|
||||
if (token == 0xff)
|
||||
{
|
||||
xprintf("no data start token received after 500ms in rcvr_datablock\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (token != 0xFE)
|
||||
{
|
||||
xprintf("invalid token (%x) in rcvr_datablock()!\r\n", token);
|
||||
@@ -296,6 +303,9 @@ static int xmit_datablock(const uint8_t *buff, uint8_t token)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
wait_ready(30000);
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user