Hello All,
I am using DM648_NORWriter to write on IntelFlash.
Since in our case it is Intel Flash.
Nor_write function would be Intel_write (or) Intel_bufferwrite function
High priority and faster write is Intel_bufferwrite function.This function return value of
retval 0 if it is OK.
This function calls following function
① To Send Write_Buff_Load command (LOCAL_flashWriteCmd())
② To Write buffer data (LOCAL_flashWriteDatabuffer())
③ To Send write buffer confirm command (LOCAL_flashWriteCmd())
④ To Check status (LOCAL_IntelWaitForStatusComplete())
⑤ To Verify program was successful ( LOCAL_flashIsSetSome())
In point 5 i.e Verify program was successful
LOCAL_flashIsSetSome() returns retval as 0 . If Buffer write is Ok.
LOCAL_flashIsSetSome() returns retval as 1 . If Buffer write is Not Correct.
LOCAL_flashIsSetSome ()
{ //**********code removed*******//
addr.cp = LOCAL_flashMakeAddr (hNorInfo, blkAddr, offset);
LOCAL_flashMakeCmd (hNorInfo, mask, &maskword);
switch (hNorInfo->busWidth)
{
case BUS_8BIT
retval = (maskword.c & *addr.cp);
break;
case BUS_16BIT:
retval = (maskword.w & *addr.wp);
break;
}
return retval;
}
Value of retval depends (For 16bit bus width (retval = (maskword.w & *addr.wp))
1. maskword.w and
2. *addr.wp
For Buffer write Ok
maskword.w value is always 0x0080.
*addr.wp value is always 0x0001
For Buffer write Not Correct
maskword.w value is always 0x0080
*addr.wp value is always 0x8080.Reason why it is turning to 0x8080 at specific flash address is not known.
Since counter measure for Buffer_write is Nor_write.What is the
Counter measure to prevent buffer_write from failing unless
as *addr.wp is turning to 0x8080.
I am not sure of what this *addr.wp does and why for specific flash address it is giving incorrect value.
The above problem occurs only between Flash address 0xA0400000 to 0xA0600000.
Please can you suggest me..whether the problem is with flash or code.If flash I checked in two boards and facing similar problem in both the boards.
Regards,
Geetha