verify PFlash_Program()

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

verify PFlash_Program()

801件の閲覧回数
tafengchung
Contributor II

How can i verify flash program?

I use this PFlash_Program() function to program s12xep100

But, I can't see any change in memory windows.

タグ(1)
0 件の賞賛
返信
2 返答(返信)

671件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi tafeng,

when you launch debugger, click "Hotsync" button in P&E connection manager for each target connection.

The Hotsync button in the Connection Assistant allows the user to connect to an already running target. thus you can check the debugger memory window, if your flash is successful programmed.

pastedImage_1.png


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

671件の閲覧回数
tafengchung
Contributor II

1) flash_program()

2) flash_Verfy

/******************************************************************************/
#pragma CODE_SEG RAM_CODE

unsigned char PFlash_Program(unsigned long address, unsigned short *ptr)
{
  unsigned char i;
  while((FSTAT & FSTAT_CCIF_MASK) == 0);  //wait if command in progress
   FSTAT = 0x30;       //clear ACCERR and PVIOL
  FCCOBIX = 0x00;
  FCCOB = 0x0600 | ((address & 0x007F0000)>>16);
  FCCOBIX = 0x01;
  FCCOB = (address & 0x0000FFFF);
  for(i=2; i<6; i++)  
  {
    FCCOBIX = i;
    FCCOB = 0xAA;
  }
 
  FSTAT = 0x80;       //launch command
  while((FSTAT & FSTAT_CCIF_MASK) == 0);  //wait for done
 
  if((FSTAT & (FSTAT_ACCERR_MASK | FSTAT_FPVIOL_MASK)) != 0)
    return FlashProgramError;
  else
    return noErr;
}
#pragma CODE_SEG DEFAULT   

/******************************************************************************/

uint8_t FLASH_Read_Byte(uint8_t * Address)
{

    return (*Address);
}

0 件の賞賛
返信