This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi.. ,
I am using Flash API for in my system. I need to modify few parameters from internal flash. I have made necessery changes as per Flash281x _API_ V 210.pdf document. I am facing follwoing problem.
After programming my flash, initially through JTag, I can modify my flash values only once. It gets erased, programmed & verified with out any problem. If I switch off and switch on my system I can see modified values also.
If I again try to modify the same Flash content, while programming it gives Error code=#1F. It suggest that
STATUS_FAIL_ZERO_BIT_ERROR, it suggest that I am try to make program one or more bits which are alreay programed. Paricular Sector is not earsed.
After this error I can not modify my paramentrs from flash by the time I reprogram my coff file through JTAG
Can any one tell me my error
thanks & regards
Sounds like you are trying to change a bit from a '0' to a '1' with the program function. The erase operation will change all bits in the sector to a '1'. Program can then only change bits from a '1' to a '0'. You cannot change a bit from a 0 back to a 1 with the program function. Changing a 0 back to a 1 requires erasing the entire sector.
What this means is once you erase a sector, you can program bits from 1 to 0 in the same word multiple times, e.g., you could program 0xFFFE to a location and then program 0xF8FE to the same location and then later program 0x78FE, and so on. But, to change any bit from a 0 to a 1, you will need to erase the entire sector.
thanks for reply. Your answer is obvious from error code.
My paramiterization function is having a particular sector erase operation. Every time after erasing particular sector only I proceed for change of parameter values& flash reprogramming. As I have explained in my first post the same function works properly when I change my parameters for the first time after programming my COFF file through JTAG.
Is there any way, I can know the flash location at which I am facing this problem? This being Flash programming, I can not make single stepping to find out problematic location.
regards
Kelkar
The API returns this information in the flash status array you supplied a pointer to.
typedef struct {
Uint32 FirstFailAddr;
Uint16 ExpectedData;
Uint16 ActualData;
}FLASH_ST;
Regards,
-Lori