EEPROM writing with global address

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

EEPROM writing with global address

1,959件の閲覧回数
Gowri
Contributor I

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

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

1,045件の閲覧回数
Bajo
Contributor I

Hi Gowri.

 

I recommend you to read AN3743.

I hope it helps.

 

 

0 件の賞賛
返信

1,045件の閲覧回数
Gowri
Contributor I

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.

0 件の賞賛
返信