Skip to content

Commit

Permalink
modify issue
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 8, 2018
1 parent 171eb0b commit 80b3547
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
16 changes: 8 additions & 8 deletions SerialFlash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,15 +1720,15 @@ int SerialFlash_rangeProgram(struct CAddressRange *AddrRange, unsigned char *vDa
return AT45rangeProgram(AddrRange, vData,mcode_Program, mcode_ProgramCode_4Adr, Index);
else if(strstr(Chip_Info.Class,SUPPORT_SPANSION_S25FLxx_Large)!=NULL)
{
if(g_bIsSF600==true)
if(g_bIsSF600[Index]==true)
return SerialFlash_bulkPipeProgram(AddrRange, vData, PP_4ADR_256BYTE,mcode_ProgramCode_4Adr,Index);
else
return SerialFlash_bulkPipeProgram(AddrRange, vData, PP_4ADDR_256BYTE_12,mcode_ProgramCode_4Adr,Index);
}
else if(strstr(Chip_Info.Class,SUPPORT_SPANSION_S70FSxx_Large)!=NULL)
{

if(g_bIsSF600==true)
if(g_bIsSF600[Index]==true)
{
return SerialFlash_bulkPipeProgram(AddrRange, vData, PP_4ADDR_256BYTE_S70FS01GS,mcode_ProgramCode_4Adr_S70FSxxx,Index);
}
Expand All @@ -1744,14 +1744,14 @@ int SerialFlash_rangeRead(struct CAddressRange *AddrRange, unsigned char *vData,

if(strstr(Chip_Info.Class,SUPPORT_SPANSION_S25FLxx_Large)!=NULL)
{
if(g_bIsSF600==true)
return SerialFlash_bulkPipeRead(AddrRange, vData, BULK_4BYTE_FAST_READ,mcode_ReadCode,Index);
else
return SerialFlash_bulkPipeRead(AddrRange, vData, BULK_4BYTE_FAST_READ_MICRON,mcode_ReadCode,Index);
if(g_bIsSF600[Index]==true)
return SerialFlash_bulkPipeRead(AddrRange, vData, BULK_4BYTE_FAST_READ,mcode_ReadCode,Index);
else
return SerialFlash_bulkPipeRead(AddrRange, vData, BULK_4BYTE_FAST_READ_MICRON,mcode_ReadCode,Index);
}
if(strstr(Chip_Info.Class,SUPPORT_SPANSION_S70FSxx_Large)!=NULL)
{
if(g_bIsSF600==true)
if(g_bIsSF600[Index]==true)
return SerialFlash_bulkPipeRead(AddrRange, vData, BULK_4BYTE_FAST_READ,mcode_ReadCode_S70FSxxx,Index);
else
return false;
Expand Down Expand Up @@ -2154,7 +2154,7 @@ int SerialFlash_bulkPipeRead(struct CAddressRange *AddrRange, unsigned char *vDa
if(!SerialFlash_StartofOperation(Index))
return false;
if(!(strstr(Chip_Info.Class,SUPPORT_NUMONYX_N25Qxxx_Large_2Die) != NULL &&
strstr(Chip_Info.Class,SUPPORT_NUMONYX_N25Qxxx_Large_4Die) != NULL && g_bIsSF600==true))
strstr(Chip_Info.Class,SUPPORT_NUMONYX_N25Qxxx_Large_4Die) != NULL && g_bIsSF600[Index]==true))
SerialFlash_Enable4ByteAddrMode(true, Index);

if(SerialFlash_EnableQuadIO(true, m_boEnReadQuadIO,Index)== SerialFlash_FALSE)
Expand Down
14 changes: 12 additions & 2 deletions project.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,19 @@ bool threadCompareFileAndChip(int Index)
if( result && (!ValidateProgramParameters(Index)) )
result = false;

if( result )
{

//refresh vcc before verify
// TurnOFFVcc(Index);
// Sleep(1000);
// TurnONVcc(Index);
// Sleep(1000);

// if(IdentifyChipBeforeOperation(Index)==false)
// result = false;

if( result )
{

ReadChip(DownloadAddrRange,Index);

size_t offset = min(DownloadAddrRange.length,g_ulFileSize);
Expand Down

0 comments on commit 80b3547

Please sign in to comment.