FXTH87xx flash operation function exec failed.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FXTH87xx flash operation function exec failed.

644 Views
fuhuiming
Contributor I

Why nothing changed after calling function TPMS_FLASH_ERASE() and TPMS_FLASH_WRITE() ?

What's wrong with code below ?

fosc = 8MHz, fbus = 4MHz

FCDIV = 21;                                      

// Fclk = 4MHz / (21+1) = 181.18KHz - 150KHz~200KHz

//----------------------------------------------------------------------------------

const BYTE CParaAddr[] @ 0xD200u =

{

0x44, 0x55, 0x66, 0xff, 0xff, 0xff, 0xff, 0xff,

0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

};

......

FCDIV = 21;

SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]);          // receive data are { 44 55 66 }

mRfData1 = TPMS_FLASH_ERASE((WORD)CParaAddr);                      // the function return 0x00, ERASE succeed ?

mCommonBuffer[0] = 0x77;

mCommonBuffer[1] = 0x88;

mCommonBuffer[2] = 0x99;

TPMS_FLASH_WRITE((WORD)CParaAddr, &mCommonBuffer[0], 10);

SendDebugContent(CParaAddr[0], CParaAddr[1], CParaAddr[2]);           // still { 44 55 66 } not { 77 88 99 }

why?

Labels (1)
0 Kudos
2 Replies

398 Views
david_diaz
NXP Employee
NXP Employee

Hello Fu Huiming,

Could you please share with me the source code in order to have a better understanding of the issue?

I am glad to help.

Have an excellent day.

David

0 Kudos

398 Views
fuhuiming
Contributor I

Thanks

0 Kudos