Hi people,
I am developing an application using Kinetis K40x256cmd100 development board. I am trying to configure EEPROM from the flex memory available in the controller.
I have read the app note AN4282. But when I tried Program Partition, send me a error (ACCERR bits[ 5:5 ] = 1 No access error detected)...
someone can explain me?, if I need doing something before the partition?
This is my code, only partition comand
/* Write the FCCOB registers */
FTFL_FCCOB0 = FTFL_FCCOB0_CCOBn(0x80); // Selects the PGMPART command
FTFL_FCCOB1 = 0x00;
FTFL_FCCOB2 = 0x00;
FTFL_FCCOB3 = 0x00;
FTFL_FCCOB4 = 0x39; /*subsytem A(16bytes) + B(16bytes)EEPROM Data Set Size (Bytes)*/
FTFL_FCCOB5 = 0x05; /*Data flash 128Kbytes & 128 Kbytes to EEPROM backup size*/
FTFL_FCCOB6 = 0;
FTFL_FCCOB7 = 0;
FTFL_FCCOB8 = 0;
asm("CPSID i");
NVM_ExecuteCommand();
asm("CPSIE i");
Hi Maria de los Angeles,
You can check the Kinetis examples for the MK40X256VMD100. You can find them here: TWR-K40X256: Kinetis K40 Tower System Module
Go to: CodeWarrior Samples\CW_MCU_v10_1_Examples\rev_1_4\build\cw10\k40\flexmem. There you will find the flexmem project which includes the configuration for the EEPROM use.
I hope this information can help you!
You can refer to this thread: Re: Demo code for using EEPROM feature on K20, 50 Mhz device
Best Regards,
Adrian