Hello All,
I am using S12XEP100 for one of our application,
I have requirement to download block parameters which are addressed in global addressing to EEPROM area.
EEPROM emulation has been enabled prior to download.
I am trying to use the following logic which was not working
while (FSTAT_CCIF == 0) { }
if(FSTAT&(FSTAT_FPVIOL_MASK | FSTAT_ACCERR_MASK))
{
/* Clear any error flags*/
FSTAT |= (FSTAT_FPVIOL_MASK | FSTAT_ACCERR_MASK);
}
/* Write the command id / ccob0 */
FCCOBIX = 0;
FCCOBHI = 0x11; /*write command for D-Flash*/
FCCOBLO = page;
FCCOBIX=1;
FCCOB = addr; /* Write next data word to CCOB buffer. */
FCCOBIX=2;
FCCOB = (uint16)(*(dataptr)); /* Write next data word to CCOB buffer. */
FCCOBIX=3;
FCCOB = (uint16)(*(dataptr+1)); /* Write next data word to CCOB buffer. */
FCCOBIX=4;
FCCOB = (uint16)(*(dataptr+2)); /* Write next data word to CCOB buffer. */
FCCOBIX=5;
FCCOB = (uint16)(*(dataptr+3)); /* Write next data word to CCOB buffer. */
/* Clear command buffer empty flag by writing a 1 to it */
FSTAT |= 0x80;
//FSTAT |= FSTAT_CCIF_MASK;
while (FSTAT_CCIF == 0) {
} /* wait for the command to complete */
Can any one help me regarding this.
With Thanks & Regards,
Gowrisankar Loganathan
Hi Gowri.
I recommend you to read AN3743.
I hope it helps.
Hello Bajo,
I checked with AN3743, it only recommends to use logical address, but I am looking for writing the EEPROM data using global address.