AnsweredAssumed Answered

flexmemory re partition

Question asked by z xj on Aug 26, 2017
Latest reply on Sep 8, 2017 by Jorge Antonio Alcala Vazquez

Hello

I had a problem with using the official development board TWR-KE18F's EEPROM, and the main chip used was MKE18F512VLL16, hoping to get directions.

The questions are as follows: I used the official routine

sdk_2.2_TWR-KE18F\\boards\\twrke18f\\driver_examples\\flash\\flexnvm_eeprom\\mdk

Sdk_2.2_TWR-KE18F\\boards\\twrke18f\\driver_examples\\flash\\flexnvm_eeprom\\mdk

I can only write 32BYTE data and show that it has been partitioned. The chip is in a non safe mode. I will do the partition operation. The partition code is as follows:

int partition_flash(int eeprom_size,int dflash_size)

{

FEFx->FCCOB0=FTFE_FCCOB0_CCOBn(0x80);

FEFx->FCCOB1=0x00;

FEFx->FCCOB2=0x00;

FEFx->FCCOB3=0x00;

FEFx->FCCOB4=0x35;

FEFx->FCCOB5=0x04;

FEFx->FSTAT=0x80;

while(!(FEFx->FSTAT & FEFx_FSTAT_CCIF_MASK));

return 1;

}

partition

 

 

 

 

Compile and run, found the re partition is not used, EEPROM size has been 32BYTE, FLASH all erase, I'm afraid the chip will be damaged, how to re partition, thank you very much.

Outcomes